|
From: | Paolo Bonzini |
Subject: | [Help-smalltalk] Re: current startup time standings |
Date: | Wed, 20 Dec 2006 09:10:15 +0100 |
User-agent: | Thunderbird 1.5.0.8 (Macintosh/20061025) |
Nice. Do you have any feel for how much these figures would change depending on what's in the image? In other words, how will an image loaded with a couple of libraries compare with a basic image?
There are two factors:1) image loading time. With the copy-on-write code, the startup time only depends on the number of OOPs, not on the size of the objects in the image. However, huge libraries such as GTK+ will create three or four OOPs for each method (CompiledMethod, MethodInfo, CFunctionDescriptor, possibly a Symbol too). Another factor is the number of symbols in the image, which slows down init_dictionary_on_image_load (this takes about 8ms on a default image and is the next candidate for a speedup...).
2) #returnFromSnapshot execution time. Right now it is close to zero, but the code in DLD is not efficient at all, because it dlopens all the libraries at startup: it can be sizable for something like GTK+. I did not change it yet just because it does not run at all in the default image. It would be interesting to attach a library name in a CFunctionDescriptor, and dlopen the libraries lazily; you may give it a try. However, if you'd find out that dlopening takes time even for (say) GNU Smalltalk's own tcp.so, I'd seriously consider moving tcp.so to the main executable.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |