from Jakub Zawadzki:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 25 Apr 2011 19:36:13 +0000 (19:36 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 25 Apr 2011 19:36:13 +0000 (19:36 +0000)
Don't thaw the packet list during file loading to speed up file loading.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36851 f5534014-38df-0310-8fa8-9805f1628bb7

file.c

diff --git a/file.c b/file.c
index 33f663f0d9c8ad466e20f5f905c580b1ac6da647..5c0214aad21adf776f39b9b1a50490051d6a4a3d 100644 (file)
--- a/file.c
+++ b/file.c
@@ -515,9 +515,6 @@ cf_read(capture_file *cf, gboolean from_save)
   gboolean    filtering_tap_listeners;
   guint       tap_flags;
   volatile int count = 0;
-#ifdef HAVE_LIBPCAP
-  volatile int displayed_once = 0;
-#endif
   gboolean compiled;
 
   /* Compile the current display filter.
@@ -558,6 +555,7 @@ cf_read(capture_file *cf, gboolean from_save)
   /* Progress so far. */
   progbar_val = 0.0f;
 
+  /* The packet list window will be empty untill the file is completly loaded */
   new_packet_list_freeze();
 
   stop_flag = FALSE;
@@ -587,19 +585,6 @@ cf_read(capture_file *cf, gboolean from_save)
       if (data_offset >= progbar_nextstep) {
         if (progbar != NULL) {
           progbar_val = calc_progbar_val(cf, size, data_offset, status_str, sizeof(status_str));
-          /* 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 || displayed_once == 0) {
-            if ((auto_scroll_live || displayed_once == 0 || cf->displayed_count < 1000) && cf->count != 0) {
-              displayed_once = 1;
-              new_packet_list_thaw();
-              if (auto_scroll_live)
-                new_packet_list_moveto_end();
-              new_packet_list_freeze();
-            }
-          }
-#endif /* HAVE_LIBPCAP */
           update_progress_dlg(progbar, progbar_val, status_str);
         }
         progbar_nextstep += progbar_quantum;