One way to cut down the amount of overhead of updating progress bars
and the like, is to only update them every so often:
repeat for each line L in some BigList
add 1 to c
if c mod 50 = 0 then set the thumbPos of sb "progressBar" to c
Of course, you're adding the overhead of maintaining a counter, and
doing 1 modulo division for each iteration, but this is insignificant
compared to updating a progress bar, and you can use whatever number
of iterations produces the best balance of visual feedback/efficiency
for your needs.
Best,
Mark
On 19 Dec 2007, at 16:29, Beynon, Rob wrote:
I'm writing tools that bash their way through thousands of lines of
input text, and do some processing.
I'd like to have a progress indicator displayed (and indeed, live
the tm dials, in particular, that I just got for Xmas!).
But, how does one write a routine to indicate progress without
imposing a penalty at each iteration? If I include the "line":
Display the progress bar for number of lines processed/ total
number of lines
Than this has as many iterations as lines.
I guess, if there has to be something in the main loop it should be
fast, and then send a message to an externally progress display
routine?
Is there a sneaky/subtle way around this?
Thoughts appreciated
________________________________
Prof R J Beynon
Proteomics and Functional Genomics Group
Faculty of Veterinary Science
University of Liverpool
Crown Street, Liverpool L69 7ZJ
________________________________
Phone: +44 151 794 4312
Fax: +44 151 794 4243
Email: [EMAIL PROTECTED]
http://www.liv.ac.uk/pfg
________________________________
This email was sent on 12/19/07 at 4:33 PM by Rob Beynon.
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution