On Thu, 22 Nov 2007 06:08:37 +0100, Joerg Mayer wrote
> On Thu, Nov 22, 2007 at 10:19:10AM +0530, Gilbert Ramirez wrote:
> The other solution mentioned (converting everything into plugins)
> doesn't work very well either (getting all the references right,
> lots of overhead if many plugins need to be loaded).
>
> The best idea I can come up with is some sort of "delayed initialization":
Yes lazy initialization would the best.
On the other hand that means wireshark have to enforce the use of the
protocols name in all fields name (it's not always the case) or filter name
check wouldn't work well in read filters and color filters.
Or:
1) copy and paste glib g_tree code and modify g_tree_insert to return the old
value if it exists, it removes the need for the g_tree_lookup call and make
init roughly 25% faster.
2) there's only a small number of slow protocols init, like:
packet-xml.c
packet-diameter.c
packet-radius.c
packet-tpncp.c
packet-rrc.c
oids_init from epan.c
they are slow because they either read data files and build huge field trees
or are asn1 generated with a lot of fields.
Without these data files wireshark load under 1 seconds even on a slow box (a
7 years old 500 Mhz G4).
So maybe lazy init these functions would be enough? Enforcing name there would
be easy.
Didier