Ethereal-dev: Re: [Ethereal-dev] [patch] gtk/progress_dlg.c: only update dialog box every 200m
Jeff Morriss wrote:
Ulf Lamping wrote:
didier wrote:
Hi
With the speed up , dialog can be updated 30 to 50 time per second,
IMO a little too much.
Didier
(30 frames a second? We could make a movie of it ;-)
patch checked in, with a small change, that the dialog will be
updated every 100ms and not every 200ms as suggested.
When testing this, sometimes the progress bar "hopped" a bit too
much, so I raised the update rate.
Does this make N_PROGBAR_UPDATES (in file.c and proto_hier_stats.c)
obsolete? E.g., can/should 'update_progress_dlg()' be called after
every packet? The comment says:
/* Update the progress bar, but do it only N_PROGBAR_UPDATES times;
when we update it, we have to run the GTK+ main loop to get it
to repaint what's pending, and doing so may involve an "ioctl()"
to see if there's any pending input from an X server, and doing
that for every packet can be costly, especially on a big file. */
With this change the comment isn't quite true anymore...
Yes and No ;-)
As there are a some things to do, getting the time from system and such,
it might be too "heavy" to call the update function everytime a packet
is processed.
It would be better to make the update truly time based, but this would
be a large (and maybe not easy) rework of the progressbar stuff...
Regards, ULFL