google / google/gopacket

init() in layers eat too much memory

Open
#165 9 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

I found in `init()` a lot of slice initialization operations.
https://github.com/google/gopacket/blob/487c0cc416754a86af4a35006a8d0e0174f75629/layers/enums.go#L379

This cost 20MB+ memory use when import this package.

is it necessary to init so much slice?
Or can it be done when need?

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.