Wireshark-dev: [Wireshark-dev] Bug in new_packet_list_thaw/_freeze while loading file
From: Jakub Zawadzki <darkjames@xxxxxxxxxxxxxxxx>
Date: Sat, 23 Apr 2011 20:29:46 +0200
Hi,

Profiling wireshark shows that new_packet_list_thaw()/new_packet_list_freeze()
takes ~64% of CPU time while loading file.

Removing some lines from file.c/cf_read:
@@ -607,10 +607,6 @@ cf_read(capture_file *cf, gboolean from_save)
           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;
-              new_packet_list_thaw();
-              if (auto_scroll_live)
-                new_packet_list_moveto_end();
-              new_packet_list_freeze();
             }
           }
speeds up loading capture file with 122 K packets from 10.908s to 4.118s

The loading time might be problem with my system or GTK+ (version 2.20.1),
and it'd be great if someone find time to test it.

About actual bug:
 In old packet list _freeze stops GtkClist from redraw while adding packets to list.
 In new packet list _freeze sets empty (NULL) model, and _thaw restores model with packets.

 I really can't remember how old packet list works while loading capture file, but I think
 code from cf_read was intented to show some packets (by redrawing GtkClist).

 With new packet list no packets are shown, cause _freeze works completly different.

Ok to remove/comment out this code?

Cheers.