Archive: Loading page defined by me takes noticible time, any way to make it faster


Loading page defined by me takes noticible time, any way to make it faster
  Hai all,
I got one problem. Actually i have one page defined by me apart from the provided pages. I is designed as it consist of 4 text boxes in it. When i start my installer, the default pages appears immediatly whereas the page defined by me takes noticeble amount of time to display properly. Is there any way to make it to appear as faster as the default pages.
With Thanks, Eka S.


Built in pages are created from resources and Windows has optimized functions to load them. InstallOptions loads the page from INI, reads field by field and creates the windows one by one, it takes a bit more time. How slow is it? A second? 10?


approx. it takes 20 secs..........


On what computer? Do you happen to have Windows XP SP1?


Please attach the INI-file (zipped).


I am using Windows 2000 on NT. And the ini file is attached with this


Do you have this problem with other examples too or any other INI using applications? Does it load slowly on other computers too? Can you please attach the script too?


I have tested this INI with the InstallOptions sample, but it works fine and without delay on a Win2000 Pro system. Even when I turn those ReserveFile-lines off. (Altough, it was compressed with zlib, so it shouldn't make any difference).


If you are using BZIP2 compression, reserve both InstallOptions and the INI file.


How to reserve InstallOptions can u give me a example........


Modern or Classic UI? Can you attach the script?


If you use BZip2 compression, then it's usefull to reserve the ini and the plugin files. This means that the files are placed at the beginning of the installer, wich may slow the loading of the installer a little bit down, but makes the installer itself much faster.
To reserve the files, use:

ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"

>ReserveFile "MyIni.ini"
B.t.w. I've also tested the script without ReserveFile, and it makes no noticeable difference in the loading time of the page. (I must say that these results are from a between Release 2.0b2 and release 2.0b3 CVS version, but that should make any difference).

The documentation explains this command very well:

Reserves a file in the data block for later use. As files are added in the order they are used in the script files that are used in the .onInit function, for example, might be added last and slow the loading of the installer. This is where this command comes useful, allowing you to speed up the loading process by including the file at the top of the data block instead of letting NSIS seek all the way down to the bottom of the compressed data block.
This means that if you have a lot of compressed data and you put the INI file at the end of it even though it's called first the loading time of the INI file will greatly increase. To prevent this you can use ReserveFile at the top of your script which will cause the INI file to be placed at the top of the data block and allow the installer to quickly extract it without seeking through a lot of compressed data.