knz / go-binsize-viz

Size visualization of Go executables using D3
GNU Affero General Public License v3.0
470 stars 30 forks source link

Large profiles unusably slow (Chrome tab crashes, Firefox takes minutes per click) #4

Open stapelberg opened 5 years ago

stapelberg commented 5 years ago

I’m trying to visualize the size of a ≈600 MB binary, and the resulting profile is very hard to use.

When I try to open it in Chrome, after the first click to zoom in, Chrome displays the “Aw, Snap!” error message, presumably because its JavaScript interpreter ran out of memory.

When I try to open it in Firefox, things seem to work better, but every click literally takes minutes of wall-clock time before anything happens.

I’m not sure what the best way forward is here. Perhaps there is a treemap that is lighter-weight. Or perhaps the level of detail of rendering needs to be capped — in my case, I get many boxes which are way too small to click, see this bottom right corner of my profile:

2019-04-03-145346_621x897_scrot

…or perhaps we could use a native application instead of a web browser?

stapelberg commented 5 years ago

It’s noteworthy that Firefox consumes 100% CPU for a few seconds, and 900% CPU for the rest. I interpret that as a few seconds of single-threaded JavaScript execution, followed by many seconds of multi-threaded rendering. My guess is that capping the level of detail could go a long way.

knz commented 2 years ago

Have you tried pre-processing your symtab to remove the entries related to Go sub-packages beyond a certain level? Something like grep -v././././.*` to remove entries more than 4-level deep