Wireshark-dev: [Wireshark-dev] IO Graphs refresh rate

Date: Tue, 16 Jan 2007 00:14:49 +0100
Hi,

I was looking for a real-time network traffic graph generator, and the best I've found was of course in Wireshark. Still, it has a refresh rate of 3 seconds on my computer, even if my processor is 95% idle. I was trying to do a quick fix, but I've never been dealing with Gtk before. Anyone have an idea how to make it faster?

What I've done as a quick and ugly fix was adding a g_timeout_add_full () to the end of gtk_iostat_init() to schedule some periodic redraw events. The code was something like te following (sorry, no diff, I do not have the source here with me):

g_timeout_add_full (G_PRIORITY_DEFAULT, 100, io_stat_redraw, io, NULL)

(of course some other code is needed to clean up when the window is closed)

This one line reduced the refresh rate to 1 sec, already much better, but I wasn't able to go below, even if I set the priority higher or the event rate to some milliseconds. I'm sure someone knowing Gtk can achieve much better with the right one line of code. Anyone knows the solution?

Thanks,
Csaba