Optimize the Packet List

The current implementation of the packet list has some serious drawbacks especially when working with large capture files.

It uses a GTKCList which is a bit inflexible, e.g. it needs to keep all the content text in memory even for the content currently not being displayed.


The first two points are very serious for performance when working with large capture files (>10MB). Allocating massive amounts of memory takes it's time and processing the coloring rules for packets that are not displayed is simply useless.

Optimizing these things will help improving the overall performance while working with large capture files a lot.

A new Design

The GTKCList doesn't provide us with the features we require to fix the problems listed above. So it's clear we have to use a different GTK widget or write a new one on our own.

Beside the current functionality, it should:

1st Prototype: GTKTreeView

According to the GTK+ API reference, GTKClist (and GTKCTree) are deprecated in favor of GTKTreeView, which supports everything above. Unfortunately, GTKTreeView doesn't exist in GTK+ 1.2.

Replacing the GTKCList by a GTKTreeView seemed to be straightforward, as the complete functionality is encapsulated in the file gtk/packet_list.c :)

I've done a prototype implementation using the GTKTreeView which wasn't very hard to do, but then I was running into some serious problems:

The files of this prototype implementation are attached (beware, ugly prototype code ahead) in case we might need it later ...

Conclusion: this won't be GTK1.x compatible and faces some significant problems which I wasn't able to solve. As the packet list is very performance critical, it might even be a good idea to not use a standard widget here so we can fine tune the behaviour ... - UlfLamping

Finalizing the prototype

The "new" packet list is now the default!

Using our own custom TreeView most problems have been addressed. With the new packet list rows do use more display space but that may be a price we have to pay. Adding rows to the list is fast as very little data is copied.



Not yet implemented feature:

Outstanding issues:

Issues Noted


Development/OptimizePacketList (last edited 2010-07-22 06:30:34 by JaapKeuter)