Sign in to follow this  
Followers 0
silverstream

Terrible file operation performance under Vista

5 posts in this topic

Hi all,

I'm having some big performance problems with some of my scripts running under Windows Vista.

I've written some scripts, one's a document synchroniser, another manages logins, and they seem to run up to 10x slower under Vista (SP2) than under 2000/XP.

They're almost unusably slow!

I won't post the synchroniser code here as I don't want to release it, and it's 1800-odd lines long, so I wrote some test code to demonstrate:

testFuncTime("fileExists('c:\windows\explorer.exe')")
testFuncTime("fileGetAttrib('c:\windows\explorer.exe')")
testFuncTime("FileGetTime('c:\windows\explorer.exe')")
testFuncTime("fileCopy('c:\windows\explorer.exe', @TempDir)")

Func testFuncTime($cmd)
    $td = 0
    For $i = 1 to 50
        $t = TimerInit()
        Execute($cmd)
        $td += timerDiff($t)
    Next ; $i
    $td = $td / 50 ; get average time across the 50 times the command was run
    consoleWrite($cmd & ": " & Round($td,2) & @CR)
EndFunc
Exit

The results on my old Windows XP laptop (a rather slow Toshiba Portege 2010, Pentium III Mobile, 256MB RAM, a slow 1.8 inch IDE hard disc, XP Pro SP3) are:

fileExists('c:\windows\explorer.exe'): 0.06

fileGetAttrib('c:\windows\explorer.exe'): 0.1

FileGetTime('c:\windows\explorer.exe'): 0.18

fileCopy('c:\windows\explorer.exe', @TempDir): 0.24

Compare that with my dual-core Portege R500 (Centrino Duo, 1.5GB RAM, normal 2.5" SATA hard disc, Vista Business with SP2):

fileExists('c:\windows\explorer.exe'): 0.59 (10x slower)

fileGetAttrib('c:\windows\explorer.exe'): 0.48 (5x slower)

FileGetTime('c:\windows\explorer.exe'): 0.38 (2x slower)

fileCopy('c:\windows\explorer.exe', @TempDir): 1.87 (7-8x slower)

I think reading INIs is also way slower under Vista.

Are there any known fixes or workarounds to this problem that anyone knows of?

Any help much appreciated.

Andrew

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi all,

I'm having some big performance problems with some of my scripts running under Windows Vista.

I've written some scripts, one's a document synchroniser, another manages logins, and they seem to run up to 10x slower under Vista (SP2) than under 2000/XP.

They're almost unusably slow!

I won't post the synchroniser code here as I don't want to release it, and it's 1800-odd lines long, so I wrote some test code to demonstrate:

testFuncTime("fileExists('c:\windows\explorer.exe')")
testFuncTime("fileGetAttrib('c:\windows\explorer.exe')")
testFuncTime("FileGetTime('c:\windows\explorer.exe')")
testFuncTime("fileCopy('c:\windows\explorer.exe', @TempDir)")

Func testFuncTime($cmd)
    $td = 0
    For $i = 1 to 50
        $t = TimerInit()
        Execute($cmd)
        $td += timerDiff($t)
    Next ; $i
    $td = $td / 50 ; get average time across the 50 times the command was run
    consoleWrite($cmd & ": " & Round($td,2) & @CR)
EndFunc
Exit

The results on my old Windows XP laptop (a rather slow Toshiba Portege 2010, Pentium III Mobile, 256MB RAM, a slow 1.8 inch IDE hard disc, XP Pro SP3) are:

fileExists('c:\windows\explorer.exe'): 0.06

fileGetAttrib('c:\windows\explorer.exe'): 0.1

FileGetTime('c:\windows\explorer.exe'): 0.18

fileCopy('c:\windows\explorer.exe', @TempDir): 0.24

Compare that with my dual-core Portege R500 (Centrino Duo, 1.5GB RAM, normal 2.5" SATA hard disc, Vista Business with SP2):

fileExists('c:\windows\explorer.exe'): 0.59 (10x slower)

fileGetAttrib('c:\windows\explorer.exe'): 0.48 (5x slower)

FileGetTime('c:\windows\explorer.exe'): 0.38 (2x slower)

fileCopy('c:\windows\explorer.exe', @TempDir): 1.87 (7-8x slower)

I think reading INIs is also way slower under Vista.

Are there any known fixes or workarounds to this problem that anyone knows of?

Any help much appreciated.

Andrew

Hi,

try to turning off the Search indexer on vista.

;-))

Stefan

Edited by 99ojo

Share this post


Link to post
Share on other sites

I've noticed a major performace hit with Windows 7 as well. That may also be Search indexing but I have my doubts. The Compiled scripts start up fine but many of the functions definitly take longer to run. I'm sure it has nothing to do with AutoIt, it an issue with Windows. I can see where it may be worse with Vista because that OS is a slug anyway and I don't even bother testing for Vista problems. I could care less if they even run on that system as long as they work on XP and now on Win 7.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I've noticed a major performace hit with Windows 7 as well. That may also be Search indexing but I have my doubts. The Compiled scripts start up fine but many of the functions definitly take longer to run. I'm sure it has nothing to do with AutoIt, it an issue with Windows. I can see where it may be worse with Vista because that OS is a slug anyway and I don't even bother testing for Vista problems. I could care less if they even run on that system as long as they work on XP and now on Win 7.

Sorry if it seemed like I was implying AutoIt was at fault - I'm pretty confident it's not. Konwing Vista, it's probably Vista.

Thanks for the pointers.

What I failed to test (and what my program does) is lots of FileExists() / FileGetTime() / FileGetAttrib() / FileCopy() functions across the LAN to a Samba server, as it syncs documents with a server copy. Running the above tests against a file on a network drive yielded even worse differences: a massive 100x speed difference for FileGetAttrib() on a copy of Au3Info.exe sitting on a network drive over 100Mbps wired ethernet - 0.2ms on XP, 19.96ms on Vista.

The other tests were between 5 and 10x slower again, but FileGetAttrib was by far the slowest.

So far I've ruled out indexing and Remote Differential Compression as culprits as disabling them both hasn't helped much.

I'll keep at it to find a fix, but any other ideas would certainly be appreciated!!

Thanks,

Andrew

EDIT 1: Disabling RSS and Auto Tuning as per here has resulted in a partial improvement - average fileGetAttrib() time across the LAN is fallen from average 19.96ms to 13.92ms. Still much room for improvement against XP's 0.2ms...

Edited by silverstream

Share this post


Link to post
Share on other sites

SOLVED.

It was a third-party app on my test Vista laptop.

The culprit was "TrueSuite Access Manager", a piece of biometric software that Toshiba preinstalled. Removing it has improved the fileGetAttrib time to 0.55ms which I can live with :)

Actually removing it has greatly improved the overall performance of the laptop. Right-click context menus in Explorer were taking over a second to show and removing TrueSuite fixed that too.

Must be quite poorly written. Hm.

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