Wireshark-dev: Re: [Wireshark-dev] New experimental feature: GTK2 basedpacket list(svn rev 2889

From: "Anders Broman" <a.broman@xxxxxxxxx>
Date: Fri, 3 Jul 2009 15:55:30 +0200
Hi,
>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.

Would it be possible to pre allocate a number of rows? When doing a live
capture it could perhaps be trimmed to the correct size when stopping the
capture and when reading from file when the file is read in, or would that
cause problems during live captures? Resorting etc.

Regards
Anders

-----Ursprungligt meddelande-----
Från: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] För Stephen Fisher
Skickat: den 3 juli 2009 01:20
Till: Developer support list for Wireshark
Ämne: Re: [Wireshark-dev] New experimental feature: GTK2 basedpacket
list(svn rev 28892)

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

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe