google / google/gopacket

layers.init cost too much time

Open
#101 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
6.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

layers.init cost about 0.2s to init.

Make it lazy init or manually init should be good.
Make it faster is also an option.
But this kind of change will break the exist clients.

* https://github.com/google/gopacket/blob/master/layers/iana_ports.go#L18 here use 176KB heap memory.
* https://github.com/google/gopacket/blob/master/layers/iana_ports.go#L5817 here use another 176KB heap memory.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.