-
-
Notifications
You must be signed in to change notification settings - Fork 166
High Mem & GC when compiling large cyclic data structure #516
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
Comments
I can say the same. I build a trading bot, getting JSON data around 1 MB per second, After 1 day I am at 200mb compared to 24mb with standard encoding/json |
same, it soared from 400MB to 1500MB in 15mins, but this is Unmarshal
|
Hi I also have huge memory consumption when unmarshalling slice of structs and saving them to the map. If I use encoding/json, than memory footprint of the same number of elements in the map after unmarshaling three times lower. |
Uh oh!
There was an error while loading. Please reload this page.
go.mod
:main.go
:The above code stuck in
func (c *Compiler) compile(typeptr uintptr)
phase. Plenty of memory was allocated and then GC contributed most of the CPU time.A pprof sample is here.
pprof.samples.cpu.001.pb.gz
And I used the following script to check how many cycle definition:
And the output is:
The text was updated successfully, but these errors were encountered: