Wireshark-bugs: [Wireshark-bugs] [Bug 1258] speed up filter routine

Date: Tue, 4 Sep 2007 16:12:41 +0000 (GMT)
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1258





------- Comment #3 from tomas.kukosa@xxxxxxxxxxx  2007-09-04 16:12 GMT -------
If I remember well results of profiling done few years ago the most expensive
task was allocation and filling in nodes of protocol tree.
As 99% of nodes are not necessary it could be possible to create some "reduced
tree" containing only nodes necessary for filtering/coloring.

It could be done e.g. in following way:
There would be set of fields which are necessary for filtering/coloring which
would be updated when rules are changed and all packets are
re-filtered/colorized.
If the tree is necessary only for the filtering/coloring then the root would be
created with a new flag "reduced".
If node which is necessary for filtering/coloring is created then it works as
now. 
If node which is not necessary is created then only some dummy node (e.g. root
itself) is returned.
If proto_tree_add_text() or similar functions creating only text node is called
a dummy node is returned.
If subtree is created the root tree is returned.
All proto_item_append_text() and similar would be ignored.

It would create flat tree containig only necessary nodes.

Do you think it would speed up filtering/coloring?


-- 
Configure bugmail: http://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.