Sign in to follow this  
Followers 0
MarcPhillips

FileInstall on Windows 7 slow

5 posts in this topic

Hello forum,

In our installer program we use FileInstall to copy files into the target directory. Under XP everything works fine. There are several thousands of files that need to be installed, individual file sizes ranging from several bytes up to 10MB. It takes approx. 10 minutes to complete the installation, which is acceptable. Under Windows 7 also no problems, however, the same installation takes 45 minutes. From the progress bar it is obvious that installing files take much longer than under XP. We have tried disabling compression but it makes no big difference. Currently, we are using AutoIt v3.3.0.0. but with v3.3.6.1 it is all the same. Does anyone know what the reason for the slow performance might be? Any help is highly appreciated.

Thanks in advance,

Marc

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi there,

I used this to create a file 10MB large (exactly):

;Create 10MB exactly

$file = @ScriptDir & "\FileOut.txt"

$open = FileOpen ($file, 18)
For $i = 1 to 10485760
    FileWrite ($open, "1")
Next

FileClose ($open)

And this to install the file as a test.

If FileExists (@ScriptDir & "\file.txt") Then FileDelete (@ScriptDir & "\file.txt")

$timer = TimerInit ()
FileInstall ("C:\Users\francisb\Documents\autoit\tetete\FileOut.txt", @ScriptDir & "\file.txt")
$diff = TimerDiff ($timer)

MsgBox (0, "", $diff)

Understandably I got different results compiled and uncompiled.

Uncompiled around 20ms (When this function is used from a non-compiled script, a copy operation is performed instead)

Complied around 140ms (default options)

Complied around 137ms (lowest UPX)

Complied around 140ms (highest UPX)

Complied around 140ms (no UPX)

All within reasonable bounds to say that the UPX doesn't have a noticeable impact on speed.

140ms is also quite reasonable for a 10MB file.

Possibly it could be other things causing the script to hang. Have you tried doing some extensive logging and testing of your program?

Cheers,

Brett

Edited by BrettF

Share this post


Link to post
Share on other sites

Hi Brett,

Thanks for quick response.

As a matter of fact, we are doing extensive logging of almost everything that happens in the program. As I have written before, the program itself works fine. Our test team has been testing it for many months and the program is being used in the field under XP. It is just slow on Windows 7.

In your test case, you have only created one file and have copied it with the result that I would have expected as well. But our intaller is 800MB large and it contains several thousand files. In our efforts to isolate the problem, we have gradually removed all potential suspects from the workflow. What remains is FileInstall calls.

Our PC hardware is not the newest, but not too old. For instance, I have an 2GHz AMD dual core system. Most test systems are in the simmilar category or better.

Regards,

Marc

Share this post


Link to post
Share on other sites

@Marc,

Do you know if its related to the size or just the number of files. Could you test with a single larger file?

What I have done in the past is to RAR all files into a single selfextracting EXE instead of using FIleInstall for all individual files.

@BrettF,

UPX is not involved in the Fileinstall() Compression. It is an internal compression algorithm. :P

Jos :mellow:


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

@Jos,

It's my impression that the size actually doesn't matter. Possibly, it's the size of the archive that makes FileInstall slow. We have already considered the idea of packing the files into an RAR/7Zip and then selfextracting them into the target directory. I was only wondering whether there is a way to improve FileInstall before we go this way. :-)

Cheers,

Marc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0