Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 52608: /trunk/epan/dissectors/ /trun
On Tue, Oct 15, 2013 at 07:19:34AM +0200, Anders Broman wrote:
> Maynard, Chris skrev 2013-10-15 00:47:
> > Why not add a fence so it's always visible then?
>
> My point is that I don't want to write column info in the VLAN dissector
> to speed up dissection. If it could
> be arranged to only write the "last" entry that will actually be in the
> packet list or written out by tshark it would be much more efficient.
I was looking on it yesterday, with libffi (nice portable library!)
it seems to be possible to call variadic functions (read: g_snprintf)
with custom arguments. We need to cache format and arguments and we could do it.
Right time no time ;|
> In the reference trace I'm pursuing col_add_fstr() costs 7.52 is called
> 4,7 million times, where of 2.8 million times is from the VLAN dissector.
I'm not sure if it helps, but I micro-optimized print_columns()
removing g_snprintf() & g_strlcat() [hope that I keep tshark output the same] in r52625.
Looking at callgrind output of some capture file of yours (TCA_SIP_performance.pcap) these calls costs 4,8M.
I hope we saved about 1-2G Ir by calling just memcpy(), could you please check in some free time?
#v+
10,589,960,094 * /home/ericsson/ewireshark/trunk/tshark.c:print_packet
3,830,250,718 > ???:g_snprintf (5743212x) [/lib/x86_64-linux-gnu/libglib-2.0.so.0.3600.0]
1,073,058,165 > ???:g_strlcat (12922227x) [/lib/x86_64-linux-gnu/libglib-2.0.so.0.3600.0]
#v-
P.S Thanks for reverting packet-vlan.c