Ethereal-dev: Re: [Ethereal-dev] [patch] gtk/progress_dlg.c: only update dialog box every 200m

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Jeff Morriss <morriss@xxxxxxxxx>
Date: Tue, 06 Jan 2004 18:08:40 -0500


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...