Startup time, a short review & discussion

John M McIntosh johnmci at smalltalkconsulting.com
Sat Aug 2 19:18:04 UTC 2003


Ah, the nice thing about benchmarking is really discovering where the  
time goes.

If I look at real clock time on the mac, 500Mhz powerbook after  
numerous passes which means everything is cached, so no disk io  
happens, then roughly I see

0.45 seconds to start the application and build the menu (really  
expensive)
0.1sh seconds to build the window
0.1sh seconds to setup the event loop logic etc
0.3sh seconds to rip the 10MB image out of the BSD file buffer caches
0.1sh seconds to do the initialization of object memory (yet that's  
lots of user CPU at this point)
0.6sh seconds to the first screen update.
	which is 0.1sh for screen resizing
	0.1sh+ looking for plugins. That I looked at a few years back because  
we spend a lot of time here hunting for usually non-existant plugins  
which might or might not involve disk io against numerious paths before  
deciding to use the internal entry points.
	Actually about 0.4sh seconds is taken before the interpret() loop  
really starts spinning...
	
I'm afraid on my machine, all of this seems trivial, but on that ARM,  
this work adds up to serious time (10 seconds).

I did note some villain that invokes someInstance, nextInstance at  
image startup time to scan
all of object memory hunting for something. Haven't gone looking in the  
image  yet, but somehow that's bad form to do that.
Ah, yes seems ExternalAddress of which there are 65 of them, invokes  
allInstancesDo: to zero the address information.

  Now I wonder if some bright fellow could change that to use a weak  
array to store all the instances and iterate over just the 65 objects  
at startup time.


On Friday, August 1, 2003, at 12:34  PM, Tim Rowledge wrote:

>
> So that's Twenty-Five seconds between starting the image and actually
> getting to do anything with it! I can't do anything much about the disc
> speed except get a faster IDE interface (don't hold your breath) but  
> ten
> seconds to get the image in order is pretty bad.
> tim
>
--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===



More information about the Squeak-dev mailing list