The next time you need to make an HTML treemap like this, try my tool: https://github.com/evmar/webtreemap

It provides a command line app that accepts simple space-delimited data and outputs an HTML file. See the doc: https://github.com/evmar/webtreemap#command-line

(It also is available as a JS library for linking in web apps, but the command line app is the one that I end up using the most. I actually built it to visualize binary size exactly like this post and then later generalized it.)

Another option is to generate a text file in the format expected by flamegraph. Especially useful when the data is hierarchical.

https://github.com/brendangregg/FlameGraph

Exemple for Java:

https://github.com/pcdv/deps-flamegraph/blob/master/README.m...