On 10/06/06, Christian Schmitz <[EMAIL PROTECTED]> wrote:

Maarten de Vries <[EMAIL PROTECTED]> wrote:

> Hi, I tested your loop, and it worked fine for me. The image
> (a photo) turned nicely blue in about half a second. Then I tried to add
a
> progressbar, and suddenly it took about 8 seconds. So, are you doing
> anything else (like updating a progressbar) inside the loop?

for a progress bar, do some math.

like

p=100*y/height
if p<>progressbar.value then // change only 100 times
  progressbar.value=p
  updatenow // refresh window
end if

PS: Most developers go in the outer loop about y and in the inner loop
about x to use the improved caching of newer processors.

Gruß
Christian



The point isn't that I want a progressbar, but why the loop might be slow.
It could be caused by updating a progressbar. And it's not (just) requesting
the value that makes the loop slow, it's setting the value. So it's not
possible to update a progressbar withouth losing speed, unless you do it in
a thread or something.

Maarten
_______________________________________________
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>

Reply via email to