You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While experimenting with decoder stacks, I realized that we're reinitializing the decoder stack for each packet, in decodeLayers(). This works against the performance benefit of gopacket.NewDecodingLayerParser and is probably accidental.
The DecodingLayerParser & decoder stack ([]gopacket.LayerType{}) should be initialized once and either passed to decodeLayers() as pointers or stored in globals.
The text was updated successfully, but these errors were encountered:
While experimenting with decoder stacks, I realized that we're reinitializing the decoder stack for each packet, in
decodeLayers()
. This works against the performance benefit ofgopacket.NewDecodingLayerParser
and is probably accidental.The
DecodingLayerParser
& decoder stack ([]gopacket.LayerType{}
) should be initialized once and either passed todecodeLayers()
as pointers or stored in globals.The text was updated successfully, but these errors were encountered: