I received a suggestion from Alan on speeding up parcel loads for BottomFeeder awhile back. I hadn't had time to look at it until just now, but I just tossed together some simple tests. Mind you, I haven't done a solid test on this yet, but the initial results look promising. Here's what a basic parcel load looks like:
Parcel loadParcelFrom: 'someParcelFileHere.pcl'.
Now, in my tests, I used the BGOK parcel (not for any specific reason; it was just a parcel that I didn't have loaded already). So, here's the small script I used for testing. I used code I already had in the PatchFileManager package so that reload exceptions were already caught. The basic code there looks like this:
[[Parcel loadParcelFrom: parcelFile] on: Parcel parcelAlreadyLoadedSignal, CodeStorageError do: [:ex | ex resume: true]] on: DuplicateBindingsError do: [:ex | ex resume]
That handles the kinds of exceptions that come up on parcel reload, and normally result in a dialog box. With that said, here are the actual tests, with timings:
mgr := UpgradeManager new. one := Time millisecondsToRun: [Parcel loadParcelFrom: '$(VISUALWORKS)\parcels\BGOK.pcl']. wrappedInitialLoad := Time millisecondsToRun: [SystemUtils modifySystem: [Parcel loadParcelFrom: '$(VISUALWORKS)\parcels\BGOK.pcl']]. reload := Time millisecondsToRun: [mgr actuallyLoadParcelFrom: '$(VISUALWORKS)\parcels\BGOK.pcl']. reloadWrapped := Time millisecondsToRun: [SystemUtils modifySystem: [mgr actuallyLoadParcelFrom: '$(VISUALWORKS)\parcels\BGOK.pcl'.]].
The initial load took between 650-680 milliseconds (labeled "one" above). I ran that a few times on clean image starts. Trying the clean load wrapped with SystemUtils modifySystem: , I got runs that varied between 450-470 milliseconds. Not tons faster, but if you start a system by initially loading a bunch of parcels, it would add up to real savings pretty fast.
Then there's parcel reload - the one labeled "reload" above, which is the way I deliver upgrades in BottomFeeder. That ran around 1600 milliseconds each time I tried it. That's a lot slower than clean load (you have relinking of the system, so that's not unexpected) - but the win came on the wrapped reload - that dropped down to around 1300 milliseconds. Again, not tons, but it adds up if you have more than one incoming update.
With these results in mind, I'm going to create a 7.4 based build of BottomFeeder, and do some testing with these changes. Looks like I could get a cheap win.