Sign in to follow this  
Followers 0
Richard Robertson

Vista animated progress bar is slow

14 posts in this topic

Today while working on something I found that the Vista animated progress bar is rather slow to update. I had my window close as soon as the actual progress was 100% finished, but the bar itself was only about 80% filled. I ran a couple tests and found it at least 600 milliseconds behind which created a clearly visible lag.

Does anyone know a solution to this?

Share this post


Link to post
Share on other sites



I've seen it too in NSIS installers that complete really quickly. The 'Finish' button shows up before the progress bar is full. It happens on Win7 as well.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

What about doing a Sleep(1) to give it a chance to update?

ProgressSet($I) ; Do some GUI update here.
Sleep(1) ; Millisecond delay will give the display a chance to refresh, without putting a huge delay, nor huge demand on the processor.
Edited by Nutster
speeling mistake

David Nuttall
Nuttall Computer Consulting

An Aquarius born during the Age of Aquarius

AutoIt allows me to re-invent the wheel so much faster.

I'm off to write a wizard, a wonderful wizard of odd...

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Sleep of one millisecond isn't long enough, as I said I counted up to 600 milliseconds before it finished updating. (Also, I'm not writing in AutoIt. That's why it's in this forum not AutoIt support.)

The problem is that I wanted the progress bar to indicate when the window would close. So it was supposed to line up exactly.

I ended up using a different indicator for the closing time. It's owner drawn but I think my way is a little more interesting too.

Edited by Richard Robertson

Share this post


Link to post
Share on other sites

Richard, I have tested the WPF and Silverlight progress bars and they are very accurate. Maybe you can use the WPF progress bar as an alternative, but that means replacing the rest of your GUI too.

Share this post


Link to post
Share on other sites

Richard, I have tested the WPF and Silverlight progress bars and they are very accurate. Maybe you can use the WPF progress bar as an alternative, but that means replacing the rest of your GUI too.

I'll play with WPF and see what I can do. As you already know, I haven't taken too well to WPF.

Share this post


Link to post
Share on other sites

Interesting hack... the only problem is trying to set 100% :/

Share this post


Link to post
Share on other sites

I've found that anything using a loop is slow in 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

I've found that anything using a loop is slow in Win 7.

What program doesn't use a loop?

Share this post


Link to post
Share on other sites

What program doesn't use a loop?

I was refering in particular to Compiled AutoIt Scripts. One of my scripts has a series of nested loops and it will never be fast on any machine at any time but if I run it against a very large script in XP it takes probably 10 seconds to complete. It takes at least 50% longer in Win 7 when run against the same script. And no I can't give you exact figures at the moment. I still have to reinstall both of those OSs so I'm relegated to Vista at the moment and I won't even look at running it in Vista.

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

The only thing that should be slower is GUI related stuff. Anything else and it's a bug.

That could be related Jon. It's the progress bar that I'm looking at but it fills a treeview after it completes the function and that still happens after the progress gets to 100%. I've been accusing MS for it as usual. You know the story, if it's slow, tedious, feature rich or downright annoying then it's written by MS. Someday there will be a viable alternative.

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

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