Archive: Translation needed


Translation needed
Just reading up on the ReserveFile command, and came across this:

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.
The second sentence is rather puzzling, in that it does not seem to make grammatical (and therefore semantic) sense. Any help decoding it (or pointing out why it does make sense and I'm just being stupid) would be much appreciated!

Thanks

-rob-

It's saying that if you place File commands in the .onInit function, it will slow down the loading of your installer and thus you should put them elsewhere (or use ReserveFile!)

-Stu


Ah ok thanks :) So would this be a good replacement for the second sentence:

Files are normally added in the order they are specified in the scripts called by the .onInit function, which slows the loading of the installer.
-rob-

A good replacement would be:

Files are added to the compressed block in the order they appear in the script. Functions, however, are not necessarily called in the order they appear in the script. Therefore, if you add a file in a function called early but put the function at the end of the script, all of the files added earlier will have to be decompressed to get to the required file. This process can take a long time if there a lot of files. .onInit is one such function. It is called at the very beginning, before anything else appears. If you put it at the very end of the script, extract some files in it and have lots of files added before it, the installer might take a very long time to load.

AH light dawns. Yeah, that IS a good replacement!