MountainGraph: Profiling data drawn as 3D landscapes Developer pcdv published MountainGraph, a static progressive web app that renders profiling data as 3D landscapes, at pcdv.github.io/mountain-graph. MountainGraph reads and writes Flamepack (`fpk`) files containing wall time, allocations, or data extracted from Java heap dumps, and parses Java Flight Recorder (JFR) and HPROF profiles plus `stackcollapse` and `cpuprofile` formats, offering 2D, 3D, and flame graph viewing modes, anonymization, a guided tour, fly-through mode, and Minecraft-style landscapes. The app is a companion to the author's jfr-web Java profiler and jheap HPROF parser, which can compress a 5 GiB heap dump to roughly 1 MiB by keeping only aggregated paths; the author said the project was built during recovery from a small injury with help from an idle Claude subscription. A progressive web app PWA that draws profiling data as 3D landscapes. You can browse the included gallery if you have no files to open. It works on a smartphone, but a computer gives the best experience. The app embeds its own documentation. This is an experiment I had in mind for years: exploring profiling data graphically, like a flame graph, but in three dimensions. I lacked the time, motivation or 3D skills to see it through. A small injury left me stuck on a couch for some time, and an idle Claude subscription did the rest. MountainGraph reads and writes Flamepack files fpk , an open format described here https://github.com/pcdv/flamepack . Those files can contain: - time spent wall time - allocations - data extracted from a Java heap dump classes or duplicated strings It can parse several file types, mainly Java profiles JFR, HPROF but also: - stackcollapse - cpuprofile conversion https://github.com/pcdv/flamepack/blob/master/tools/cpuprofile.mjs is needed first More formats could be added if needed. Non-exhaustive feature list: - Viewing modes: 2D, 3D, Flame graph - Anonymization - Tour guided slide show - Fly-through mode - Minecraft-style landscapes It is a companion app to other tools I wrote: - jfr-web https://github.com/pcdv/jfr-web : a Java profiler based on JFR CLI and web app , working in several modes: standalone, embedded, static HTML. It adds the notion of an operation e.g. HTTP request, RPC call, JUnit test and many ways to inspect them. It supports flak https://github.com/pcdv/flak applications out of the box. - jheap https://github.com/pcdv/jheap : parses HPROF files and outputs a Flamepack file. It can lossily "compress" a 5 GiB heap dump in around 1 MiB by keeping only the aggregated paths. The resulting file can be opened in MountainGraph, or further analyzed by jheap itself. I wrote a small agent skill that uses jheap to quickly find the source of a memory leak. A flame graph shows where the time went, but it can only be read in one order at a time. Top-down, it ranks the most expensive stacks. Inverted, it ranks the hot methods and spreads their callers beneath them. MountainGraph is an experiment in using a third dimension to show both at once. It draws a profile as a landscape. The methods that take the most time rise as peaks the inverted view , and the call paths into them form the slopes the stacks of the top-down view , down to the entry points, a request or a thread, at the foot. The question it asks is not only where? but why do we keep ending up here? A heap dump reads the same way. The objects holding the most memory are the peaks, and the references that lead to them are the slopes, out to the roots that hold everything up. It is one static page, with no build step and no server. Drop a file on it and it works out what the file is. A topographic map comes first, then the same terrain in 3D. The TypeScript compiler type-checking a React front end. One peak is stat , the time spent in the file system, and the flame graph of the whole profile stands behind the land. Another view on a Java application's unit tests. Each island is a hot spot. Two of them are real findings: CustomTemporaryFolder was a high source of latency in the test run, and CPUMemExtractor called an expensive Windows counter, until it was optimized away. The allocations of a Gradle daemon. The peak, char , is 5.8 GiB, 97% of it from jgitver working out the version from the git tags. The same daemon in time, with the waits left out, which would otherwise be the highest peaks. The mesa is the compile, and the island labelled 1005078208.test is jgitver's tag filter again, 2.3 seconds of the worker's time. The page works on a phone. Here is the TypeScript compiler again, the land in blocks: one finger turns it, and two fingers pinch to zoom. The page is published at https://pcdv.github.io/mountain-graph/ https://pcdv.github.io/mountain-graph/ , with a few profiles to open from its landing page. A file is read in the browser and goes nowhere else. The page installs as an app, from the browser's menu "Install" or "Add to Home screen" . Installed, it opens with no network, as it was when last seen online. On a desktop, the system then offers it to open .jfr , .fpk , .hprof and the other files it reads. An installed page still updates itself: it is fetched from the network first whenever there is one. To run it locally, Node 21 or later, with nothing to install: npm run serve http://localhost:8091/ browsers refuse modules opened from file:// npm test the tests of the modules without DOM To open it from a phone on the same network, serve it on every interface. It prints the addresses to browse to, for example http://192.168.1.20:8091/ : npm run serve -- 8091 0.0.0.0 port, then host Pick a file or drop it on the page, gzipped or not: the page tells what it is from its first bytes. First, samples, of time or of allocations: - JFR recordings .jfr , JDK 11 and later , read in the page. A recording holds two kinds of samples, which weigh different things, so both are read, and a Samples choice in the top bar switches between the wall clock Java and native samples, weighing time and the allocations weighing bytes . A recording read this way has no operations. - Flamepack https://github.com/pcdv/flamepack .fpk , version 5, 4 or 3 : collapsed stacks packed with a string dictionary, each sample enriched with its time, thread and operation. jfr-web https://github.com/pcdv/jfr-web writes it from its recordings, time or allocations GET /api/sessions/:id/profile ; a static export, jfr-web export