Wireshark mailing list archives

Re: [Wireshark-commits] master 43b77ae: Qt: Add an event processing timer.


From: Gerald Combs <gerald () wireshark org>
Date: Thu, 17 Sep 2015 16:35:27 -0700

On 9/17/15 2:12 PM, Jeff Morriss wrote:
On 09/17/15 16:25, Wireshark code review wrote:
URL:
https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=43b77aeebf4e23d629bc45be0b10b65c8aa17ac9

Submitter: Gerald Combs (gerald () wireshark org)
Changed: branch: master
Repository: wireshark

Commits:

43b77ae by Gerald Combs (gerald () wireshark org):

     Qt: Add an event processing timer.

     When updating the progress dialog (which happens each time we read a
     packet) the GTK+ UI processes application events every 100ms. Do the
     same in the Qt UI.

Interesting...  I had been looking briefly at the Qt progress dialog
because I noticed that, when loading a very large capture file, the dialog
doesn't update very smoothly or regularly (this is Qt5 on Linux/X11).

With this 100msec timer it seems to update much more regularly but it only
updates every 2 *seconds* (about 10 updates during a 22-second file load). 
I'm guessing it doesn't behave like that on other systems?

The GTK+ and Qt UIs update at the same intervals here for the test captures
I'm using. Out of curiosity can you try changing

    WiresharkApplication::processEvents();
    dlg->elapsed_timer->restart();

to

    dlg->elapsed_timer->restart();
    WiresharkApplication::processEvents();


I did notice that the progress bar only updates every 500ms for one
capture, apparently because the file takes ~50s to load and...

(Also, side note: file.c doesn't call update_progress_dlg() for every
packet; it aims to call that function 100 times while reading a file.)

... 50 / 100 = 0.5. That is, for both GTK+ and Qt our update interval is
the greater of "100ms" or "the time it takes to process 1% of our packets."
Would it make sense to call update_progress_dlg() in file.c based on a
timeout instead of a percentage?
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: