Morphic slowness (was Re: Does *anyone* use MVC?)
Dan Ingalls
Dan at SqueakLand.org
Fri Aug 2 05:26:00 UTC 2002
>PS: Oh, yes...
>I checked a 2.8 Squeak and it does not exhibit this property (you have to edit the method for pasteUpMorph>>displayWorld, since debugShowDamage had not yet been made into a preference) and, yes, it feels a lot faster too.
Here's another take on slowness, using browser creation instead of menu creation...
I grabbed a piece of code out of the SystemDictionary>>macroBenchmarks and made it so it would run in both 2.8 and 3.3. Here's the code, that you can printIt in a workspace (it opens 10 browsers in a row, and then closes them):
-------------
saveMorphs _ self currentWorld submorphs.
self currentWorld removeAllMorphs. "heh, heh"
time _ Time millisecondsToRun:
[1 to: 10 do: [:i | Browser fullOnClass: SystemDictionary selector: #abandonSources].
self currentWorld submorphs do:
[:m | m delete. self currentWorld doOneCycle]].
self currentWorld addAllMorphs: saveMorphs.
time
-------------
In 3.3 this runs in 16-17 seconds on my machine.
In 2.8 the time is 5.2-6.2 seconds on the same machine.
That's what people (myself included) are feeling. This is a factor of 3!
Now, let's look a bit closer:
In 3.3, this invokes package-pane browsers. Fortunately this can be turned off with a preference, so I tried it, and got essentially the same times:
15-16 seconds
Then I turned off the optionalButtons feature for the browsers. Ahah:
11-12 seconds
But in spite of playing with just about every other relevant preference, that's about as far as I could get. Turning off rounded corners made almost no difference (nice to see -- we've beat on this one), although losing the alternate scrollbars *and* turning off rounding got down to about 10 seconds.
So from my brief exploration, it seems that as yet unknown factors have slowed browser creation by almost 100%, and then we've added another 50% in frills that can be turned off.
- Dan
More information about the Squeak-dev
mailing list
|