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
This looks like a memory leak to me since it's unlikely the garbage collector ran in the short time my program was running, and during that time it managed to slurp up 13 GB of memory.
The text was updated successfully, but these errors were encountered:
The Node struct isn't very lean, and considering multiple Node are created for a single .Add depending on the key length, this result may be reasonable.
type Node struct {
val rune
path string
term bool
depth int
meta interface{}
mask uint64
parent *Node
children map[rune]*Node
termCount int
}
Doing a quick analysis in the NewChild method allocs (from a bench of Add):
Maybe modeling the children as a simple slice would be more memory efficient, even if getting elements to involve iterating (mem cache might even transform it into a faster solution).
This package is pulled in as a dependency of one of my dependencies, and it's causing unusually high RAM usage. Related issue: https://github.com/prologic/bitcask/issues/67
This looks like a memory leak to me since it's unlikely the garbage collector ran in the short time my program was running, and during that time it managed to slurp up 13 GB of memory.
The text was updated successfully, but these errors were encountered: