Skip to content

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

@ransford

Description

@ransford

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    perfPerformance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions