Speeding up file installations
We haven't talked too much about how the files and directories that you author in your WiX source files are stored in the MSI database's tables. The files are stored in a table called File, the directories in a table called Directory, and the components in a table called Component. You can see this by opening the MSI package with Orca.exe.
In the following example, I have four files that are being installed. I've used the convention of prefixing my file IDs with "FILE_", giving me FILE_InstallMeTXT
, for example.
Each file in the File table is sorted alphabetically by the Id
you gave to it via the File
element. This is the order in which the files are copied to the end user's computer. So, how can you make things faster? You can give your files IDs that will cause WiX to sort them more efficiently.
The file copy process takes longer when Windows has to write to one directory and then switch to another and then another and so on. If it could copy all of the files...