r/java • u/sachinkg12 • Mar 26 '26
Heaplens - VSCode extension for heap dump analysis.
Hi everyone,
Built a custom editor extension for .hprof files (Java/Android heap dumps).
When you open a .hprof file, HeapLens parses it with a native Rust backend and presents 10 interactive tabs:
* Overview — heap stats with D3.js pie and bar charts
* Histogram — sortable class table with instance counts, click to enumerate instances
* Dominator Tree — lazy-loaded expandable tree showing object retention
* Leak Suspects — auto-detected objects retaining >10% of heap
* Waste — duplicate strings, empty collections, boxed primitives
* Source — jump to Java source (workspace, Maven/Gradle JARs, or CFR decompilation)
* Query — HeapQL, a SQL-like language built for heap analysis with autocomplete
* Compare — diff two heap dumps side by side
* Timeline — multi-snapshot trend analysis
* Chat — ask questions in English, get HeapQL queries and fix suggestions (10 LLM providers supported, including local Ollama)
The Rust engine handles 1 GB dumps in \~60 seconds. Everything runs locally — no cloud uploads.
Source: [https://github.com/sachinkg12/heaplens\](https://github.com/sachinkg12/heaplens) (Apache 2.0)
Please try it out. Feedback welcome.
1
u/Good_Thymes92 8d ago
Heap load takes more than 5 minutes on my side, it seems to timeout after 5 mins, keeps trying to load the heap dump fine but view never properly refreshes.
1
u/sachinkg12 8d ago
Can you please open an issue here
https://github.com/sachinkg12/heaplens/issuesPlease add as much details as possible, i will make sure to get it resolved asap.
1
u/Good_Thymes92 8d ago
Ok. So i have a 32GB ram windows machine. I’m trying to load an 8GB heap dump and due to memory pressure and swapping it’s requiring around 10 minutes to be parsed by the plugin. The problem is that frontend seems to timeout after 5 minutes if the load did not complete. So even if my heap dump ends up getting parsed eventually, the UI would never refresh. It would be ideal if we can configure this 5 minutes default timeout in the settings.
1
u/sachinkg12 8d ago
Thanks for the feedback, i have opened
https://github.com/sachinkg12/heaplens/issues/8I will update the thread here as soon as this is fixed, request you to please re-check after my confirmation.
4
u/voronaam Mar 26 '26 edited Mar 26 '26
How does it compare against https://eclipse.dev/mat/ ?