Confused about wxWindow::Update() vs Refresh()
Paul Melis
paul at science.uva.nl
Tue Feb 19 02:29:40 PST 2008
Michael Hieke wrote:
> Paul Melis wrote:
>
>> Thanks, 2.8 did the trick. The application now also noticeably
>> processes the input faster. I guess this must be because the progress
>> callbacks now update the progress bar widget immediately without
>> starting a new event loop (like the previous version using wxYield
>> did).
>
>
> If you notice this it probably means that you update the progress bar
> way too often. More than 10..30 times a second does not make sense,
> as the user can't process that information anyway. Limit the progress
> bar update rate accordingly, and the processing speed might improve
> even more...
Thanks for the tip. The progress updates are actually triggered by
callbacks from a processing library. For each of the multiple steps in
the processing pipeline progress update events are generated. I've now
limited the number of updates to 10 per second and it indeed shaves off
quite a bit of time from the total load time. (But the progress bar no
longer grows smoothly anymore, of course ;-))
Paul
More information about the wx-users
mailing list