diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-05-25 23:48:29 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-05-25 23:48:29 +0000 |
commit | 41aec2220656a2dc7a3c3a93f63389ba2a28f51b (patch) | |
tree | f06c9452a6c13d9e7064e5327456414a8d6335cf /file.c | |
parent | 2300dea14cb2265c3c3d0c4c61eb7641d8175013 (diff) |
From Didier Gautheron via bug 3391:
when loading files > 50 MB wireshark redraws the first pane on each
update_progress_dlg(). If auto_scroll_live is not set that's mean it redraws
the same rows again and again.
The patch attached only redraws it once or if cf->displayed_count < 1000, in
case you have a very big screen.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28475 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -415,6 +415,7 @@ cf_read(capture_file *cf) volatile gint64 progbar_nextstep; volatile gint64 progbar_quantum; dfilter_t *dfcode; + volatile int displayed_once = 0; /* Compile the current display filter. * We assume this will not fail since cf->dfilter is only set in @@ -486,14 +487,17 @@ cf_read(capture_file *cf) progbar_val = 1.0f; } if (progbar != NULL) { - /* update the packet lists content on the first run or frequently on very large files */ + /* update the packet lists content on the first run or frequently on very large files */ /* (on smaller files the display update takes longer than reading the file) */ #ifdef HAVE_LIBPCAP - if(progbar_quantum > 500000 || progbar_nextstep == 0) { - packet_list_thaw(); - if (auto_scroll_live && cf->plist_end != NULL) - packet_list_moveto_end(); - packet_list_freeze(); + if (progbar_quantum > 500000 || displayed_once == 0) { + if ((auto_scroll_live || displayed_once == 0 || cf->displayed_count < 1000) && cf->plist_end != NULL) { + displayed_once = 1; + packet_list_thaw(); + if (auto_scroll_live) + packet_list_moveto_end(); + packet_list_freeze(); + } } #endif |