Closed fabiospampinato closed 1 year ago
MemLab analyzes heap snapshots. Taking heap snapshots automatically triggers GC in V8. So objects unreachable from GC roots are not visible to MemLab. If you are looking for opportunity to trim unnecessary allocation, perhaps one incomplete approach is to find duplicated objects and duplicated strings in heap snapshots.
I see it's just not what the tool was designed for, and maybe V8 doesn't provide the necessary tooling to really tackle on GC'd methodically. Thanks.
Open to ideas if anybody has any, checking for duplicates didn't seem to be particularly useful for what I was inspecting.
Is it possible to use this tool to analyze why minor/major GCs happen? i.e. it'd be useful to get some kind of list of objects that get allocated and GC'd between the page load and when the final snapshot happen, so that one can try to trim it.