Hi Chris, On 20 Apr 2013, at 22:56, Chris <cpmbailey@btinternet.com> wrote:
I've recently upgraded a project to Pharo 2 which went relatively smoothly but thought I'd share my experience with loading times
In Pharo 1.4, it used to take about 5-6 minutes to build everything from a base image but I noticed that if I ran the package loads inside a SystemChangeNotifier uniqueInstance doSilently: then the load time went down to like 2 minutes without any other side effects.
In Pharo 2, it was taking a lot longer so I ran it through the equivalent SystemAnnouncer uniqueInstance suspendAllWhile: which did the job in terms of speed but all of the classes ended up unpackaged. After a little bit of digging I eventually found that by running MCWorkingCopy unregisterForNotifications before the package load, it came back to a sensible load time and everything seems to work again.
My question is can this practice become part of a configuration load? I tried loading Iliad from the package cache just as an example and if you do a ConfigurationOfIliad load it takes 310 seconds, whereas MCWorkingCopy unregisterForNotifications. ConfigurationOfIliad load. MCWorkingCopy registerForNotifications. only takes 42 seconds. The main problem seems to be MCPackageManager>>#methodModified which sets the package modified state is taking about 60m/s to run each time because it is initializing an RPackage for every package in the system. Is there any way this can be cached better?
Cheers Chris
I can't answer myself, but I support your question. Loading takes way too long, your solution seems to go in the right direction, now it is up to the experts... Sven -- Sven Van Caekenberghe Proudly supporting Pharo http://pharo.org http://association.pharo.org http://consortium.pharo.org