Posted: Mon Jun 09, 2008 7:37 pm Post subject: A couple of questions about the patch installation process
I happened to have Installer's log open today when I was installing Patch-6, and a noticed a couple of behaviors that I wondered if they could be optimized:
1) The installer checks every application in /Applications and children to see if it's NeoOffice--this is what allows NeoOffice to be moved or renamed, which is really nice --but I wondered if that could be optimized to look for NeoOffice first at /Applications/NeoOffice.app, thereby saving anyone who hasn't moved the app a search through all their apps? It looks like the script even reads the "last-known location" value from a file at the beginning of the process, but it doesn't attempt to use that value, instead starting to check every app.
2) After finally finding NeoOffice in /Applications/NeoOffice.app, Installer installed the new files. Immediately after completing that, it continued searching /Applications and children for NeoOffice before finally quitting. What's the purpose of this extra search; why can't the Installer just quit then?
The whole patch-installation process took 7 minutes (on an admittedly older, slower machine), but 5 of those minutes were step 2
Obviously I don't know all the cases that the installer script is designed to handle, but I think it would be helpful to many if the common cases could be optimized, if possible.
Smokey _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Posted: Mon Jun 09, 2008 7:48 pm Post subject: Re: A couple of questions about the patch installation proce
sardisson wrote:
The whole patch-installation process took 7 minutes (on an admittedly older, slower machine), but 5 of those minutes were step 2
My results don't agree with yours. Checking if a Contents/MacOS/bootstraprc file exists takes milliseconds at most and traversing the directory tree may take a few seconds.
What I see most of the time spent is unzipping the files in the NeoOffice.app that the installer script finds. There is no output for this step so maybe you are counting the unzipping in the 5 minutes?
I can definitely confirm that what you are seeing is the unzipping part of the installation. I commented out the pax (this is the unzipping) command and the unopkg.bin (this installs Ed's various extensions) command that both execute when a NeoOffice installation is found and the patch installer ran in only 27 seconds.
In contrast, adding those two critical commands back in (and I have only one NeoOffice installation that those commands execute for), took a couple of minutes.
If you have several NeoOffice installations, I can understand how it would take 7 minutes to install, but if you have only a single NeoOffice installation, then there is something else going on on your machine. Are you installing to a remote volume? Is your machine CPU starved? Or are other applications on your machine hogging the disk?
I just installed the patch on my 10.5/Intel machine, and the results match yours much more closely: 5ms to search the /Applications tree to find NeoOffice (which happens twice, for a total of 10ms), about 45ms for the installation of the files into NeoOffice, and 3ms to finish searching the /Applications tree, ending with a total run of 34 seconds!
That's not at all what's happening on my 10.3.9 machine. It has a similar application load (but nothing actively "doing stuff" when Installer was running), a bit less RAM, local disk, and only 1 Neo 2.2.3 (I still have a 2.1 and such, but it doesn't do any installation to those); I suppose it really could just be *that much* slower. Extraction time was negligible, as far as could tell.
That's not at all what's happening on my 10.3.9 machine. It has a similar application load (but nothing actively "doing stuff" when Installer was running), a bit less RAM, local disk, and only 1 Neo 2.2.3 (I still have a 2.1 and such, but it doesn't do any installation to those); I suppose it really could just be *that much* slower. Extraction time was negligible, as far as could tell.
Extraction time is negligible? I don't think think so. Your Panther log shows show unzipping 11 MB of files take 0 ms. Basically, AFAICT, the Panther installer timestamps in your log are grossly inaccurate. Note that I did not use the log timestamps when I profiled the installer. Instead, I actually timed it with a clock.
If you want to repeat what I did on Panther, you can try editing the installutils script in the installer's Contents/Resources subdirectory. Search for the "update_installation" function and add "return 0" in the first line of the function and rerun the installer. The installer now won't install anything so it should run quite fast in the last step.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum