Hi, I am trying to create custom dissector for Modbus protocol in Lua. The issue that I am facing is that even though the dissectors work fine, it is taking wireshark a very long time to load the file and apply filters. I suspect that the reason behind the lag is that the dissectors come into action thus causing the lag. The same issue is present even when I try to apply filters based on certain port numbers or other things. Hence I wanted to know if is any way the dissector code could be optimized to load the files faster and to reduce the time to process the captures after a filter is applied. The capture files that I am using as test data are approximately 250 MB each.
asked 08 Aug '16, 10:53
Lua already has a thin interface with the C layer, have you started profiling which parts are exactly expensive? Try disabling some parts of the Lua code and measure the required time. Baseline is an empty dissection function (or even no Lua dissector at all).
With tshark and the
For profiling the dissection time in the GUI, you can look at the time in the bottom right ("Load time").
Conversion between Lua and Wireshark types are possibly more expensive too, so avoid calling
Other possible optimizations:
answered 09 Aug '16, 14:38