On 20 April 2013 22:56, Chris <[email protected]> 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.
SystemAnnouncer suspension is buggy.
announce: anAnnouncement
self isSuspended
ifFalse: [
self private announce: anAnnouncement.
super announce: anAnnouncement ]
should be:
announce: anAnnouncement
self private announce: anAnnouncement.
self isSuspended
ifFalse: [
super announce: anAnnouncement ]
>
> 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?
>
yes the code there needs review.
> Cheers
> Chris
>
>
--
Best regards,
Igor Stasenko.