Wireshark-dev: Re: [Wireshark-dev] New experimental feature: GTK2 based packet list(svn rev 288

From: Stephen Fisher <steve@xxxxxxxxxxxxxxxxxx>
Date: Thu, 2 Jul 2009 17:20:18 -0600
On Thu, Jul 02, 2009 at 10:13:54AM +0200, Anders Broman wrote:

> I played with it a bit and loading large files is quite slow but 
> removing the resorting for every row speeds it up to be faster than 
> the original code I think. A 61Mb trace New packet list with patch 
> ~11s, old WS (SVN Rev 27374) ~16s

As you can see, packet_list_append_record() in gtk/packet_list_store.c 
does a g_renew() to add each additional record (packet) to the list 
store.  It would probably be useful to scan through a capture file for 
the number of packets and then allocate enough memory so that we don't 
have to renew it every time.  Of course, when doing a live capture, this 
wouldn't be possible.

> Memmory usage is much higher though 183 744Kb vs 252 388K. Should some 
> columns be stored as numbers instead of strings?

I'm going to see (if someone doesn't beat me to it) how custom we can 
make the values that are stored.  Perhaps we can store IP addresses for 
example in binary and have the packet list display them in a normal 
format.  Or... ?


Steve