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
I have implemented logic to trace my program's logic units' interaction using graphviz diagram(it is huge one with dozen MB each), and I found each time I rendered the svg file, my go process memory shoot up significantly and it doesn't come down to expected level after garbage collected. (I have properly called the rendered graph's close and the graphviz instance's close for each call)
From golang's pprof tool, I can see the WASM part is retaining huge amount of memory
I created instance of graphviz in each call and after rendered the svg file, I close both, should I only create one global graphviz instance instead ?
graphviz.New(ctx)
The text was updated successfully, but these errors were encountered:
Same here, can confirm a potential memory leak (or other ways of growing memory over time) when often using the SVG rendering. Was the same in the non-Wasm kind, but the Wasm style seems to trigger this quicker and/or heavier.
Especially when the application is running in some kind of server mode, where it doesn't get restarted frequently, even small SVG graphs constantly increase (in slower steps) the overall memory usage constantly over time.
BTW: Kudos to the Wasm migration of this library, that really rocks generally and is awesome! Thx for this great project!
I have implemented logic to trace my program's logic units' interaction using graphviz diagram(it is huge one with dozen MB each), and I found each time I rendered the svg file, my go process memory shoot up significantly and it doesn't come down to expected level after garbage collected. (I have properly called the rendered graph's close and the graphviz instance's close for each call)
From golang's pprof tool, I can see the WASM part is retaining huge amount of memory
I created instance of graphviz in each call and after rendered the svg file, I close both, should I only create one global graphviz instance instead ?
graphviz.New(ctx)
The text was updated successfully, but these errors were encountered: