danvk / source-map-explorer

Analyze and debug space usage through source maps
Apache License 2.0
3.82k stars 100 forks source link

Improve performance of HTML generator #186

Closed khanguy00 closed 4 years ago

khanguy00 commented 4 years ago

getWebTreeMapData takes too much time with [combined] bundle. In my big project, with 10000 files (max directory depth: 11) in the combined bundle, it takes ~45s, while the rest of exploreResults only takes 3s in total.

This PR is about to move the combined bundle away from getWebTreeMapData(), and re-create it by merging the tree data of other bundles. The merging logic also costs ~2s in my project, but it's much less than 45s.

nikolay-borzov commented 4 years ago

Update snapshots using test:update-snapshots script

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.5%) to 97.394% when pulling e3d7e1089b4f9d3bb229add5aef4ce8b46707237 on khanguy00:improve-performance-html-generator into 73214835c8c2961aa8216db24563c927f81373da on danvk:master.

nikolay-borzov commented 4 years ago

Thanks for your contribution!