PDA

View Full Version : More Performance needed



NewsArchive
06-28-2012, 04:29 AM
Hi Friedrich,

the following script snippet takes huge time for a 2MB msi (ansi)-log file:

---------------------------------------------------------------------

Set Variable %[L]MSILOGLINECOUNT% to FUNCTION:Count Lines from
"%[L]MSILOG_ANSI%"

Set Variable %[L]COUNTER% to "1"

Set Installer Flag $SB_DISABLEEVENTLOGFLAG$ to "1"

Loop (%[L]MSILOGLINECOUNT% Times)

Set Variable %[L]LOGLINE% to FUNCTION:Get Line "%[L]COUNTER%" from
"%[L]MSILOG_ANSI%"

Set Installer Flag $SB_DISABLEEVENTLOGFLAG$ to "0"

Install Event Entry: "%[L]LOGLINE%"

Set Installer Flag $SB_DISABLEEVENTLOGFLAG$ to "1"

Set Variable %[L]COUNTER% to (Increment by 1)

End

Set Installer Flag $SB_DISABLEEVENTLOGFLAG$ to "0"

---------------------------------------------------------------------

How can I speed up this process?

Thanks for your answer
Markus

NewsArchive
06-28-2012, 04:29 AM
Markus,

>
> How can I speed up this process?
>

What you can try to do is to develop your own Win32 DLL (e.g. with Visual
Studio) and call it from within the installer to speed-up a specific
process.

Friedrich

NewsArchive
06-28-2012, 04:29 AM
Not sure if this can help to speed it up:

Get Line--This function reads the next line from a text file if the Line
parameter is set to '0' (and does not close the file). To close the file
after reading the next line, call the function again set "Line" to '-1'

Friedrich

NewsArchive
06-28-2012, 04:30 AM
If your MSI log contains, say, 9000 lines than this will avoid ~9000
open/seek/close operations. This might speed up the process.

Friedrich

NewsArchive
06-28-2012, 04:30 AM
Thanks!

This is a very big improvement. It's about 50 (fifty!) times faster...

Markus

NewsArchive
06-28-2012, 04:30 AM
> Thanks!
>
> This is a very big improvement. It's about 50 (fifty!) times faster...

Cool :)

Friedrich