adrien
07-16-2009, 11:57 PM
we recently changed our installer to do all the "work" of installation in the On Progress event handler for the "while installing" screen.
This was done so we could show progress of our tasks, some of which can take a long time.
Prior to this, we did our actions in On Pre Install and On Post Install. This would cause nothing to be displayed by the installer (no screen at all - nada) for too long (over 10s) while we say stop a service etc. This could lead users to think the installer had crashed, and terminate it with task manager.
Ok, so we put absolutely EVERYTHING into the while installing On Progress event.
This included writing a LOT of registry strings. We only did this work if e_Stage == INSTALL_STAGE_PREPARING (for stopping services and apps), and if e_Stage == INSTALL_STAGE_CREATING_SHORTCUTS (to install service, install driver, set registry).
One effect of doing this, is that installing files is now EXTREMELY slow, and the installer irsetup.exe runs at 100% CPU.
So I'm wondering if the installer is parsing the entire Lua script each file? Surely not? Why does putting actions in unrelated stages affect the INSTALL_STAGE_INSTALLING_FILES stage?
Actually ideally the framework would allow this - allow us to do stuff that we can show in the progress dialog of the main "While installing" screen.
Splitting out each stage into its own event would be great, and have another event you call between each stage. E.g. instead of having just On Progress, you would have
OnPreparing
OnPostPreparing
OnInstallingFiles
OnPostInstallingFiles
OnCreatingUninstaller
OnPostCreatingUninstaller
OnCreatingShortcuts
OnPostCreatingShortcuts
events.
how 'bout it?
This was done so we could show progress of our tasks, some of which can take a long time.
Prior to this, we did our actions in On Pre Install and On Post Install. This would cause nothing to be displayed by the installer (no screen at all - nada) for too long (over 10s) while we say stop a service etc. This could lead users to think the installer had crashed, and terminate it with task manager.
Ok, so we put absolutely EVERYTHING into the while installing On Progress event.
This included writing a LOT of registry strings. We only did this work if e_Stage == INSTALL_STAGE_PREPARING (for stopping services and apps), and if e_Stage == INSTALL_STAGE_CREATING_SHORTCUTS (to install service, install driver, set registry).
One effect of doing this, is that installing files is now EXTREMELY slow, and the installer irsetup.exe runs at 100% CPU.
So I'm wondering if the installer is parsing the entire Lua script each file? Surely not? Why does putting actions in unrelated stages affect the INSTALL_STAGE_INSTALLING_FILES stage?
Actually ideally the framework would allow this - allow us to do stuff that we can show in the progress dialog of the main "While installing" screen.
Splitting out each stage into its own event would be great, and have another event you call between each stage. E.g. instead of having just On Progress, you would have
OnPreparing
OnPostPreparing
OnInstallingFiles
OnPostInstallingFiles
OnCreatingUninstaller
OnPostCreatingUninstaller
OnCreatingShortcuts
OnPostCreatingShortcuts
events.
how 'bout it?