Startup time, a short review & discussion

Lex Spoon lex at cc.gatech.edu
Fri Aug 1 19:34:01 UTC 2003


John M McIntosh <johnmci at smalltalkconsulting.com> wrote:
> I've been glancing at squeak startup time on the mac this morning and  
> have a few observations. Actually I have noticed on
> windows the images "SNAP' open, but take seconds on the mac and I'd  
> like to fix that... What I've discovered is that
> 
> 13.3% of the time goes to initializeObjectMemory actually  
> (adjustAllOopsBy:by:)
> 4.3% of the time goes to flushExternalPrimitives.
> (ignore the rest because I'm not sure now to fix yet).
> 

This seems odd.  The image is only 5-30 megabytes most of the time, and
so scanning through shouldn't take but a fraction of a second each time.
 Also, is 13% really going to be a satisfactory, even if you get rid of
it?  It sounds like you are observing a huge difference.

Incidentally, on Linux I see the first load taking 4-5 seconds as the
hard drive whirls, and the second load taking about 1 second.  Maybe the
read routine you are using an MacOS isn't dealing well with the disk
cache?

Anyway, if you really want to speed up the low-level loading stuff, how
about making all the various scans happen in one pass?  That should make
a sizable difference due to the much better caching behavior.  The
expense would be significantly more complex code, however.


Another idea to think about, is to make the VM tolerant of an
incorrectly set root bit.  I dunno how easy that would be.


Maybe the best solution is to just wait for the version-4 image format. 
How long until this happens?  If we start from scratch, we could simply
be very careful that the on-disk image is ready to load and run if the
address works out to be in the same place.  Isn't there a list somewhere
of desirables for version 4?  Put this on the list.  :)


Lex



More information about the Squeak-dev mailing list