Re: [Cython] compiler performance issue for extended utility code

2011-10-16 Thread Stefan Behnel

mark florisson, 08.10.2011 15:18:

On 8 October 2011 13:10, Vitja Makarov wrote:

I've also noticed that some utilities are loaded unconditionally
perhaps it's better to introduce lazy loading.


Well, they shouldn't be. If they are it's generally a bug. I noticed
that it happens in the test runner though, although it should create a
fresh context with freshly initialized entries.


I recently ran only the couple of with-statement related tests through 
cProfile and it told me that it had spent something like 20 seconds in 
"builtin method sub()", i.e. doing completely useless string processing, 
followed by some 3 seconds or so for the rest of the compilation and test 
execution. That doesn't sound right.


Stefan
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] compiler performance issue for extended utility code

2011-10-16 Thread mark florisson
Tempita uses re.sub to do the parsing. Most utilities are loaded at
module-level, so perhaps we should use lazy loading like Vitja
suggested. Are the cythonscope utilities loaded?

On 16 October 2011 19:46, Stefan Behnel  wrote:
> mark florisson, 08.10.2011 15:18:
>>
>> On 8 October 2011 13:10, Vitja Makarov wrote:
>>>
>>> I've also noticed that some utilities are loaded unconditionally
>>> perhaps it's better to introduce lazy loading.
>>
>> Well, they shouldn't be. If they are it's generally a bug. I noticed
>> that it happens in the test runner though, although it should create a
>> fresh context with freshly initialized entries.
>
> I recently ran only the couple of with-statement related tests through
> cProfile and it told me that it had spent something like 20 seconds in
> "builtin method sub()", i.e. doing completely useless string processing,
> followed by some 3 seconds or so for the rest of the compilation and test
> execution. That doesn't sound right.
>
> Stefan
> ___
> cython-devel mailing list
> cython-devel@python.org
> http://mail.python.org/mailman/listinfo/cython-devel
>
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] compiler performance issue for extended utility code

2011-10-16 Thread mark florisson
On 16 October 2011 19:51, mark florisson  wrote:
> Tempita uses re.sub to do the parsing. Most utilities are loaded at
> module-level, so perhaps we should use lazy loading like Vitja
> suggested. Are the cythonscope utilities loaded?
>
> On 16 October 2011 19:46, Stefan Behnel  wrote:
>> mark florisson, 08.10.2011 15:18:
>>>
>>> On 8 October 2011 13:10, Vitja Makarov wrote:

 I've also noticed that some utilities are loaded unconditionally
 perhaps it's better to introduce lazy loading.
>>>
>>> Well, they shouldn't be. If they are it's generally a bug. I noticed
>>> that it happens in the test runner though, although it should create a
>>> fresh context with freshly initialized entries.
>>
>> I recently ran only the couple of with-statement related tests through
>> cProfile and it told me that it had spent something like 20 seconds in
>> "builtin method sub()", i.e. doing completely useless string processing,
>> followed by some 3 seconds or so for the rest of the compilation and test
>> execution. That doesn't sound right.
>>
>> Stefan
>> ___
>> cython-devel mailing list
>> cython-devel@python.org
>> http://mail.python.org/mailman/listinfo/cython-devel
>>
>

Sorry for the previous accidental top-post.

Most of these problems will go away if we get a libcython module and a
cython.h header. In the meantime we could do the lazy stuff, it
shouldn't be hard to implement. Maybe load it when any of the
attributes get accessed and just wrap it.
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel