pombreda / gheat

Automatically exported from code.google.com/p/gheat
0 stars 0 forks source link

Nested function in pil_.py is slow (patch attached) #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I profiled the PIL renderer and found that I spent around 20 of 40 seconds
of rendering time defining points() in rebuild() in base.py (line 282). The
attached patch makes it a member function called _iter_points() instead,
which should save creating a new function all the time.

Original issue reported on code.google.com by evilspor...@gmail.com on 15 Aug 2008 at 4:50

Attachments:

GoogleCodeExporter commented 9 years ago
Do you have your profiling script? I'm not seeing a significant improvement 
with the 
script at __/bin/speed-test.py.

Original comment by whit537@gmail.com on 5 Nov 2008 at 6:44

GoogleCodeExporter commented 9 years ago

Original comment by whit537@gmail.com on 5 Nov 2008 at 7:01

GoogleCodeExporter commented 9 years ago
I misread the profiling output -- it just seems to spend a lot of time in that
function, but the fact that it's nested doesn't seem to make a difference. 
Sorry!

Original comment by evilspor...@gmail.com on 6 Nov 2008 at 5:08

GoogleCodeExporter commented 9 years ago
No worries. Thanks for the feedback/patch anyway, and sorry to be so long in 
replying.

Original comment by whit537@gmail.com on 7 Nov 2008 at 1:54