Is there a feature in VSCode to plot the memory used by each variable in a Julia session? Something like an interactive pie chart:
https://github.com/JuliaCI/Coverage.jl?tab=readme-ov-file#memory-allocation
It doesn't plot like a pie chart, but there are tools you can use to plot a flamegraph
Thanks @Kyle Beggs , I used this --track-allocation
option in the past, but it is not exactly what I am looking for. The option you mentioned only saves files to disk where Julia allocated memory line by line in the scripts.
I am looking for memory usage in a session at any given time. I have variables loaded in a session, and would like to see which variables are consuming most of the memory, makes sense?
Ah, I see. I agree this would be useful, don't know how to go about that. Sorry
VSCode already has a Julia
pane with all the variables in the session, but it doesn't show any memory size information.
Seems like you really just need to iterate through that list and call summarysize
then you can sort and plot. The guys that develop the VSCode Julia extension would probably be able to do this somewhat easily
summarysize
can sometimes take several minutes on large objects, I'll note
That would be a super useful feature, specially if we can have an interactive pie chart that can zoom in the fields of structs in a tree-like structure.
I did the Base.summarysize
for all objects in the session and they sum up to 9Gb, but htop
is saying that Julia is consuming 16Gb
The runtime is basically doubling the memory usage of the session
Have you looked into heap snapshots and the various tools that can view them? https://discourse.julialang.org/t/plans-for-viewing-heap-snapshots/98696/2
Brian Chen said:
Have you looked into heap snapshots and the various tools that can view them? https://discourse.julialang.org/t/plans-for-viewing-heap-snapshots/98696/2
First time I hear about it. Any visual feature in VSCode to inspect memory would be great.
https://github.com/JuliaLang/julia/issues/52680
Last updated: Dec 28 2024 at 04:38 UTC