[CONNECTORS] performance improvement idea (was RE: [Q] slow animated dashed lines/connectors)

Ned Konz ned at bike-nomad.com
Sat Apr 19 16:06:37 UTC 2003


On Saturday 19 April 2003 08:05 am, Hernan Tylim wrote:
> Hi,
> 	I have a similar problem and what I thought to improve the UI
> response when using too many connectors was to modify the
> connector's step mechanism so they would step in a thread/process
> with less priority than the UI thread (rather than in the same as
> it is now). About the morphic calls that would be needed to be
> executed by the connector on its step method (like for example
> #position) they would be executed with a #addDeferredUIMessage:.
>
> 	My guess is that when you have too many connectors and they only
> are computing constraints (there are not too mach drawing involved)
> all this #step execution shouldn't affect the UI no more. But I
> didn't test it.

I think this isn't a problem with the constraint computation, but with 
the repeated redrawing.

> 	In your particular case I don't know if it would help because it
> seems there are too many draws, though
>
> 	Ned, What do you think about this idea? Is it doable?

Could be. There are three different step methods active in this case:

* the Connector step method, which is trying to compute the proper 
parent for the Connector. This could be lower priority.
* the constraint step methods, which return quickly after computing 
the target if they don't have to move.
* the PolygonMorph step method, which is animating the dashed line 
(and causing a redraw).

> NOTE: I didn't execute any profiler so I don't really know that the
> step methods are the ones causing the sluggishness.

I have noticed some slowdown in *very* complicated Connectors drawings 
because of the step methods. But then I got a faster computer, and it 
didn't bother me any more.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE



More information about the Squeak-dev mailing list