[GOODIE] Fun with QuadTrees

Andreas Raab andreas.raab at gmx.de
Tue Jul 22 09:58:01 UTC 2003


Hi Eddie,

> I would be very impressed if there is a 20x overall difference
> between quadtrees and this binary method.

No, I meant a 20x difference between regular lists and the list scroller ;-)
The Quadtree should perform very similar as the two are both using spatial
subdivision schemes.

> By the way, since PluggableLists pretty much assume a constant
> list height, can't you dispense with binary subdivision and
> calculate the visible morphs directly?

If you want to assume fixed height yes. But that's one of the restrictions I
really don't like and my point was in showing that you can get very similar
speedups using binary subdivision without having to compromise too much. In
terms of speed, using binary subdivision is (for all practical purposes) as
fast as computing the indexes directly.

> There's at least one other possibility for List display with 
> fast scrolling as well as fast opening. Have your List morph
> contain enough StringMorphs to fill it, and rotate the contents
> to give the illusion of scrolling. This has the advantage of
> low memory usage as well. I talked to Lex a bit about this,
> and he likes his method better :)

Well, depending on your goals one may choose either solution. But if you
start "recycling" string morphs then you could equally well draw the
elements yourself and not even bother with a full morph construction. If
it's just about speed then drawing things for yourself is definitely the
fastest thing to do.

Cheers,
  - Andreas



More information about the Squeak-dev mailing list