Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't rebuild the decoding stack for each packet #10

Open
ransford opened this issue Mar 11, 2019 · 0 comments
Open

Don't rebuild the decoding stack for each packet #10

ransford opened this issue Mar 11, 2019 · 0 comments
Labels
perf Performance

Comments

@ransford
Copy link
Contributor

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.

@ransford ransford added the perf Performance label Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf Performance
Projects
None yet
Development

No branches or pull requests

1 participant