Lowering high CPU rates?
Sarah Reichelt
sarah.reichelt at gmail.com
Sun Mar 16 17:55:31 EDT 2008
> > I'll confirm that. I recently wrote a script that had to process a lot
> > of data, and I added a progress bar as a matter of course. The script
> > took 6 seconds to complete. That felt like quite a long time, so I
> > started adjusting the progress update to only change every so many
> > cycles. The longer between updates, the faster the script ran. Then I
> > had an epiphany and removed the progress bar altogether -- and the same
> > data got processed in about a dozen milliseconds. The entire lag was the
> > progress bar!
> >
> > Rev is so fast, sometimes you forget.
>
> Hummm... maybe I better rethink adding the progress bar entirely and
> stick with the occasional label field updates. =/
Don't forget that not all computers are fast especially as the user
may be doing something else that is grabbing a lot of the CPU at the
time. I prefer Richard's method of occasional progress bar updates.
Unless you are sure that the process will be extremely quick in all
circumstances, removing the progress bar may not be a good solution.
Cheers,
Sarah
More information about the use-livecode
mailing list