Progress Bar

Scott Rossi scott at tactilemedia.com
Thu Mar 29 19:20:38 EDT 2012


Hi Pete:

Locking the screen is one way to speed things up, if you're not already
doing that, but make sure you unlock at the end of the loop, and relock at
the beginning.  Another method that can help facilitate processing is to NOT
update the progress bar in every loop.  Use a counter to increment progress
every 2nd, 5th, 10th loop (whatever makes sense), so updating progress has a
lower impact on the repeat loop.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design



Recently, Pete wrote:

> Thanks guys.  I put a wait 0 in there and that made the progress bar update
> visible. Seems kinda weird that there's a difference between not waiting
> and waiting zero, but that's OK!
> 
> This does lead to an interesting conundrum though.  It takes about 2.5
> times longer to process my test data with a progress bar than without one.
>  Not talking huge amounts of time - about 1 second vs 2.5 seconds - but
> those times could get a lot longer in production, maybe by a factor of 10
> or more, and this particular function of the application is going to be
> judged at least partly on performance.
> 
> I calculate the update interval by dividing the number of records to be
> processed by 100 with a minimum of 10 to deal with small data sets.  I
> guess maybe I can play around with the divisor of 100 to see what yields
> the best blend of performance while still showing progress.
> 
> I might also try using an animated cursor to see how it compares
> performance wise.
> 
> Isn't there some rule of quantum physics about changing the outocme of an
> experiment by observing it?
> 
> Pete
> 
> On Thu, Mar 29, 2012 at 3:13 PM, Roger Eller
> <roger.e.eller at sealedair.com>wrote:
> 
>> On Thu, Mar 29, 2012 at 6:03 PM, Pete wrote:
>> 
>>> I'm using a progress bar for the first time.  Checked it all out stepping
>>> through things in debug and all worked fine.  However, when I run it
>>> normally (meaning no debug), the blue progress bar never moves beyond
>> it's
>>> startpos.
>>> 
>>> I'm pretty sure this is because I'm updating it in a tight loop and LC
>>> doesn't get a chance to update the screen but I'm uncertain how to solve
>>> that without adding to the overall execution time of the loop.
>>> 
>>> Enlightenment much appreciated.
>>> 
>>> --
>>> Pete
>>> Molly's Revenge <http://www.mollysrevenge.com>
>>> 
>> 
>> Add a super-tiny wait to the end of the loop (25 to 100 millisecs,
>> depending on what you're doing).
>> 
>> ~Roger
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
> 








More information about the use-livecode mailing list