> Thanks for the call graph. I suppose this output was generated by  
> cProfile? 
Yepp

> getattr is called 12,000 times. There are also lots of other blocks which  
> have a call count of 3,000 to 4,000. It's hard to pick a single block in  
> which a lot of time is spent, the time is wasted around the observable and  
> event sending. I suspect doing all those function calls is really slow  
> (especially in python. Also more than 50,000 function calls to add 76  
> nodes (26 rects + 50 lines) is way too much.

That's what I felt too.

> >> 1) implement a "freeze" "thaw" scheme, so the user could turn off the
> >> system when they now they are updating a lot.
> >>
> 
> I think something like this can be added easily, but it might break parts  
> which rely on the system. E.g. the render-to-surface nodes that I pointed  
> out. You could start by removing __setattr__ in some way. This will stop  
> all the change monitoring and thus notification sending. Not sure what the  
> result will look like, but you can try :)
enablespeedmode is doing that as far I can see, but thats something that
can't be reverted easily... (I assume simple restoring the method is not
working)

> quite simple. I think I just bound the "transformChanged" event of the two  
> rectangles which are connected by the line. When one of their transforms  
> changed, I updated the end points of the line.
Thanks for the starting point...

_______________________________________________
FloatCanvas mailing list
[email protected]
http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to