google-code-export / labyrinth

Automatically exported from code.google.com/p/labyrinth
GNU General Public License v2.0
2 stars 0 forks source link

performance decreases a lot in complex maps #55

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
the performance seems to decrease exponentially when you start doing big
maps. Here is a sample one. It makes my pentium M lag a lot while moving
things around and adding new thoughts, whereas it was very snappy in the
beginning.

Is it possible to profile/optimize labyrinth's performance? Where could the
bottleneck come from?

Original issue reported on code.google.com by nekoh...@gmail.com on 9 Apr 2007 at 4:28

Attachments:

GoogleCodeExporter commented 9 years ago
Ye.  Haven't really looked at optimisation yet :(  Python has some simple 
profiling
tools built in that I can't remember how to use.  I suspect the major problem 
comes
from 2 (related) things: 1. All thoughts are redrawn - doesn't matter if they're
offscreen or not.  2. The entire area is redrawn at every event (key press, 
cursor
change, moving thought).

Marking as Accepted and adding Performance keyword.

Original comment by DonScor...@gmail.com on 17 Apr 2007 at 5:40

GoogleCodeExporter commented 9 years ago
Checked in some optimizations: 1. offscreen thoughts are not drawn, however 
there
seem to be some miscalculations because clipping happens too early in vertical
direction. 2. I implemented partial invalidation which is done for keypresses 
and
selection. Unfortunately it is missing the most prominent slowdown, moving 
thoughts.
This is going to be tough because all affected links have to be taken into
consideration too.

Original comment by matthias...@gmail.com on 24 Mar 2008 at 10:37

GoogleCodeExporter commented 9 years ago
To profile python we can use this comand: python -m cProfile src/labyrinth.py .
The result shows what are the most critical methods are.

Original comment by sinfr...@gmail.com on 31 Mar 2008 at 3:38