Archive: Latency period at the execution


Latency period at the execution
Hello,

I have an important latency period between the installer execution and the first page display. So users can believe the installer is not running during this period !!!

An automatic message should be displayed to inform users of the "verifying package" and "unpacking data" ??????
Yes : Why it is not displayed ??
No : How can I display these messages ??

Thanks.

PS: I don't use MUI.


Reserve all Plugin DLL's and all other files that are extracted during the initialization of your installer and the the "latency period" should be gone. Use the ReserveFile instruction at the top of your script...


Thanks LoRd_MuldeR, I thought also about this solution so I apply it and the latency period is now correct.
But I don't understand why I had not the messages "verifying package: ??%" and "unpacking data: ??%" at the beginning whereas they have to be displayed automatically (when these tasks are too long) !!


I have an other problem !!!!
Using the function ReserveFile, the latency period is now correct ... at the installer execution but now I have a latency period between a components page and a custom page (using nsDialogs plugin) !!!!!


Are you sure the "nsDialogs" plugin DLL and all files required to display the page are reserved as well? You should reserve those files right after the files required for initialization. Then the delay should be gone...


I have different situations depending on reservations done.

All plugins and images reserved :
=> latency period between the components page and a custom page

All plugins reserved (no images reserved) :
=> latency period between the language selection and the first page (a custom page)

All images reserved (no plugins reserved)
Or No plugins and no images reserved
=> latency period at the installer execution (before the language selection)


Originally posted by Corpio
All plugins and images reserved :
=> latency period between the components page and a custom page
Obviously you forgot something or you reserved in a sub-optimal order...

(...or it's already as fast as it can be)

Have you an exemple of a sub-optimal order ?


ReserveFile "Data\VeryLargeFile.dat"
ReserveFile "Installer\CustomPage.ini"

Section
SetOutPath $INSTDIR
File "Data\VeryLargeFile.dat"
SectionEnd

Function .onInit
InitPluginsDir
File /oname=$PLUGINSDIR\page.ini "Installer\CustomPage.ini"
FunctionEnd

The problem here is the reservations order, the file "Data\VeryLargeFile.dat" has to be reserved in last !!
But why ????
- because we use it before the other
- because it is the biggest


Because files are added to the "data block" of the installer in the same order they appear in the script. The .onInit function is called on initialization of the installer, but in the script it appears last. Normally "CustomPage.ini" would be added last to the data block, although we want it to be at the very beginning of the data block! ReserveFile can be used to workaround that problem. But only when used in the correct place and in a correct order. The earlier you access a file at runtime, the more we want to have that file at the beginning of the data block. In my example I reserved "VeryLargeFile.dat" before "CustomPage.ini", which is a bad idea, obviously! Of course you cannot have all files at the very beginning, but usually Plugin DLL's as well as other resources required for initialization and custom pages should be reserved. Again in the order they are accessed (extracted) at runtime! Reserving files that are only extracted in a "normal" section should not be reserved, normally. Also reserving "big" files before other files might destroy the efficiency of ReserveFile, so better limit it to "small" files...


Now I think I have understand how it works but I don't find a solution. I tried to reserve all files or comment a part of my code but I have always a latency period somewhere.

No ReserveFile
=> latency period between the installer execution and the language selection

ReserveFile "LangDLL.dll"
=> latency period between the language selection and the custom welcome page

ReserveFile "LangDLL.dll"
ReserveFile "nsDialogs.dll"
ReserveFile "background.bmp"

=> latency period between the components page and a custom page with RadioButtons and a FileRequest created with nsDialogs

If I comment my RadioButtons
=> latency period on click on the BrowseButton

I use no other plugins (except in Sections), no other images, no INI files ... So I don't know what to do !!!