Browser on slower machines

Stephane Ducasse ducasse at iam.unibe.ch
Sat Jul 26 18:31:56 UTC 2003


Hi eddie

I have the impression that once the event notification of roel will be 
in, we could
completely rethink the classOrganizer (which is bad anyway) to use the 
events and do some smart caching. However this is true that **any** 
improvements in that area would be good.

Stef


On Saturday, July 26, 2003, at 08:24 PM, Eddie Cottongim wrote:

> Hi,
>
> I've been noticing that on my slower machine, the Browser is quite 
> slow. If
> I open up all the Morph methods and click or use the arrow keys to move
> through them, it takes about two seconds to display each new method.
>
> I'm finding that for each new method selection by arrow key/mouse 
> click,
> ClassOrganizer>>allMethodSelectors gets called 4 times. This requests 
> that
> the message list be sorted, and that takes a bit of time, about 50% of 
> the
> total time spent updating.
>
> It seems like we can cache the sorted version of the list, but you 
> need to
> be careful to invalidate the cache when the original (elementArray) 
> changes.
> I've created a private accessor method for elementArray that does 
> this, and
> replaced the original direct writes to this variable with calls to the
> private accessor. Its actually quite rare that elementArray needs to be
> resorted after being created - usually when a method is added or 
> removed. So
> far it seems to handle these events fine.
>
> I don't claim to be any kind of expert in this area, so if anyone 
> wants to
> see if this makes sense that would be great. If there are no big 
> problems
> I'll repost as [ENH] later. Should make the biggest difference for the 
> PDA
> crowd.. others may not notice it much.
>
> Benchmarks..
> On the slow (~133mhz) machine, browsing through Morph all methods, this
> change got me from about 2 seconds to move from one method to another 
> to
> about half a second. On a faster (600mhz) machine, the display feels 
> almost
> synchronous with the keypress, where there was a small but palpable 
> delay
> before.
>
> There was about a 5% improvement in MacroBenchmark #6. On faster 
> machines
> this difference will probably dissapear into the noise. You wouldn't 
> expect
> even the 5% difference, but the method was being called multiple times 
> per
> Browser and added up to something noticable.
>
> Eddie
>
>
>
>
> <ClassOrganizerCache-efc.3.cs.gz>



More information about the Squeak-dev mailing list