diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-03-08 06:48:01 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-03-08 06:48:01 +0000 |
commit | 050979d522abbdf9e894b38851c96208f55c5a6d (patch) | |
tree | f41f143380d62300eb71f55e799901d44b29428e /packet.h | |
parent | dc8fa8baf3d48dd60dd3da778bd84d1eb82c5d32 (diff) | |
download | wireshark-050979d522abbdf9e894b38851c96208f55c5a6d.tar.gz wireshark-050979d522abbdf9e894b38851c96208f55c5a6d.tar.bz2 wireshark-050979d522abbdf9e894b38851c96208f55c5a6d.zip |
We already set the foreground and background color for every frame,
which means we're already doing a "do something to the last row in the
packet list" operation on every frame we add to the list, so adding a
call to "gtk_clist_set_row_data()" won't make matters worse.
In addition, we already set one column in a row on a "change time
format" operation, so finding the row for a frame by calling
"gtk_clist_find_row_from_data()" doesn't turn a constant-time operation
into a linear-time operation, it just cranks the proportionality
constant up - it was quadratic before, alas, and it's still quadratic.
Adding calls to "gtk_clist_find_row_from_data()" to the "Find Frame" and
"Go To Frame" code does add an extra linear operation there, but those
operations shouldn't be common - and "Go To Frame", going to the last
frame on an ~100,000-frame big capture file, was quick, at least on my
450 MHz Pentium II machine, so maybe it won't be too bad.
And "select_packet()" either has to search the frame table for the frame
with the specified row number, or has to call "gtk_clist_get_row_data()"
to do that - the first is linear in the position of the frame in the
frame table, and the latter is linear in its position in the CList, and
the latter is less than or equal to the former, so the only thing making
it worse would be a change in the proportionality constant.
So it probably won't hurt performance by much.
Furthermore, if we add the ability to sort the display on an arbitrary
column, or to delete frames from the display - both of which are in the
wish list - storing the row number of the frame in the "frame_data"
structure won't necessarily work, as the row number can change out from
under us.
Therefore, reinstate the old way of doing things, where we associate
with each row a pointer to the "frame_data" structure for the row, using
"gtk_clist_set_row_data()".
svn path=/trunk/; revision=1703
Diffstat (limited to 'packet.h')
-rw-r--r-- | packet.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1,7 +1,7 @@ /* packet.h * Definitions for packet disassembly structures and routines * - * $Id: packet.h,v 1.173 2000/02/18 13:41:26 oabad Exp $ + * $Id: packet.h,v 1.174 2000/03/08 06:47:51 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -134,7 +134,6 @@ typedef struct _frame_data { guint32 del_usecs; /* Delta microseconds */ long file_off; /* File offset */ column_info *cinfo; /* Column formatting information */ - gint row; /* Row number for this packet in the display */ int lnk_t; /* Per-packet encapsulation/data-link type */ gboolean passed_dfilter; /* TRUE = display, FALSE = no display */ char_enc encoding; /* Character encoding (ASCII, EBCDIC...) */ |