Comments (7)
So the problem with gzip, as I understand it, is that it requires all of the content to get an accurate result. Once you've got the content gzipped, there's no clear indicator for how much of the final bundle is taken up by an individual file as parts might be shared across multiple files, and you're working with an unparseable binary at that point.
@Raynos @ForbesLindesay any suggestions on how to make this work?
from disc.
I see two different features here. It's certainly useful to see the impact individual modules have on the final minified/gzipped size. And this could be accomplished as @Raynos described above.
But a much more simple metric could cover 60% of the use case. That is, just include the total filesize of the entire gzipped bundle in the output report. Personally, I would be happy to make my decisions per module/filesize based on the uncompressed ratios and existing graphs. But then my changes can be validated by seeing the gzipped filesize continue to drop after making changes.
So I would be happy just to see the gzipped filesize of the single bundle. That's good enough for me.
from disc.
this would be great behind an options flag.
from disc.
Definitely - I need to rewrite file-size-tree so that it can handle extra metrics. After that this should be easy to add as a flag, and/or a toggle so that you can compare minified/unminified size :)
from disc.
👍 would be sweet
from disc.
@hughsk it would work for minified stuff.
from disc.
@hughsk as an unreliable heuristic I would recommend gzipping all "packages", i.e. all files in each package. Then adding that up, which will be bigger then the bundle gzipped.
Then show percentages i.e. which package contributes more.
The heuristic is that most of the sharing happens for files within a package, and that showing the break down at a per package level might be a useful rough count
from disc.
Related Issues (20)
- TypeError: Invalid non-string/buffer chunk HOT 1
- TypeError: Cannot read property 'source' of undefined HOT 18
- Flat disc instead of hierarchy HOT 2
- module not resolving when using disc HOT 2
- Cant pipe into discify HOT 1
- --open in conjunction with --output
- feature request: console reporter HOT 1
- Manage external package only bundle HOT 3
- discify missing some scripts HOT 2
- Outdated dependency `bl` causing install failure HOT 8
- Flattened npm 3 installs don't display dependency hierarchies correctly
- Unexpected token: ILLEGAL HOT 2
- ES6 syntax (computed property names) causes esprima-fb error
- --open does not work on Windows HOT 1
- error "Duplicate data property in object literal not allowed in strict mode" HOT 1
- Update d3 to v4 modules
- Can the visualization be used with other (non-bundle-related) data?
- Not working with browserify+vue?
- fix npm 3 module resolution HOT 5
- release new version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from disc.