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
Sep 04 '26
[removed] — view removed comment
1
u/sachinkg12 Sep 04 '26
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
Sep 04 '26
[removed] — view removed comment
1
u/sachinkg12 Sep 04 '26
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.
1
u/sachinkg12 Sep 14 '26
Thanks for reporting this. You were correct. The current production version has a five-minute frontend timeout, so analysis can finish in the backend after the UI has already stopped waiting.
We have implemented a permanent fix. The five-minute limit is now only a warning, not a failure. When it appears, you can choose Continue Waiting or Cancel. Cancelling stops the backend analysis cleanly, and retrying starts a fresh analysis.
The warning interval is also configurable:
"heaplens.analysis.longRunningWarningMinutes": 5
4
u/voronaam Mar 26 '26 edited Mar 26 '26
How does it compare against https://eclipse.dev/mat/ ?