|
mgmsky wrote:
I need to explain the data packets from the customer inside LUA. it needs to convey a string inside LUA, so i use lua_pushlstring, but people response that lua_pushlstring is in lowefficiency and advise not to use it often.
Is this for a Wireshark dissector?Do you have any measurements (profiling) to indicate the lua_pushlstring() is causing problems?
You cannot avoid using lua_pushlstring() if you really must exchange strings between Lua and C. I can imagine cases (very large volumes of traffic, say) where dissectors would be slow enough to get in the way, but I have not experienced that problem myself.
Doug