phetsims / chipper

Tools for developing and building PhET interactive simulations.
http://scenerystack.org/
MIT License
11 stars 14 forks source link

Visualize the size of components in a built HTML #641

Open samreid opened 6 years ago

samreid commented 6 years ago

Based on discussion in https://github.com/phetsims/resistance-in-a-wire/issues/120 and follow-up discussion with @jessegreenberg I had an idea about how to visualize the size of a built HTML file. We could update the build process to output strings to separate files instead of concatenating the HTML string to a single file. Then we can use a tool like windirstat or Disk Inventory X to visualize the size of all components. We could output one folder for preloads with one file per minified preload, one folder for mipmaps, one for requirejs, etc. The requirejs build step could do the same thing--output each minified module to a file.

Earlier today @ariel-phet said our file size is not a problem, but I am somewhat curious about investigating this strategy. Would it be OK to ask @jonathanolson for a time estimate for implementing this strategy in chipper 2.0 (perhaps after the dust settles)?

ariel-phet commented 6 years ago

@samreid feel free to bring this up as a question to @kathy-phet during the next status meeting. I think if she sees keeping file size down, or starting to work on minimizing it as a goal, we could investigate further.

Currently it seems low in terms of priorities for the project.