On 30 Dec 2005, at 13:46, Craig A. Finseth wrote:
progress.prog.value=progress.prog.value+1
It's possible that an entire row would process in such a short time,
that even doing it every row is too much.
I'd do it like this:
UpdateCount = UpdateCount + 1
if UpdateCount > 100 then // or some number, maybe not 100
UpdateCount = 0
if WaitUntil <= ticks then
progress.prog.value= i / y * progress.prog.maximum
Waituntil = ticks + 60 // updates once a second.
end if
end if
Put that in the outer loop, and that'll save you a lot of time in
doing your updates. The most frequent check, will be the integer
check, which is very quick. then it does some stuff with a ticks()
function which is not as quick but quicker than the UI. Then if both
of those conditions pass, it goes through the UI.
Something like this, you can stuff into an intensive algorithm
without really slowing it down noticably.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|