-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
min.js file may not be the last in the file list, and there could be multiples #14
Comments
|
The more I think about it, the more I actually hate both the jQuery list re-use and the grunt-compare-size assumption that the list item in the list is the gzip item. |
Yeah i know what you're saying. I would actually be happier if we just reported the gzip size of the min.js file in a one-line compact format, at least that would be short. |
I'd like to address this by accepting a compressor function in the task options and sending all files through it; output would look something like:
@dmethvin, @rwldrn: thoughts? |
I'd like to see a more compact format. How about this? Sizes Diff
9363 -4 gz:2895 tasks/compare-size.js
2687 = gz:1139 dist/source.js
305 = gz:208 dist/source.min.js Also the thing where it compared the size to every branch you have locally was waaaaay too verbose for the case where you're landing lots of other people's stuff. I was getting two screens full of diff info and having to blow away the branch .sizecache often. Perhaps it could use an activity (last commit) date to avoid spamming the console. Or we could just show the min/gz number since that's all we care about on the other branches? |
Multiple branch verbosity is a separate issue (literally so: gh-15), but regarding this, don't we want size comparisons against both uncompressed and gzipped versions of the files? In jQuery's case it'll be three lines per entry: Compared to last run
-4 gz:-3 dist/jquery.js
-1 gz:-1 dist/jquery.min.js Edit: plus three lines for "Sizes", which I now realize is probably what you're trying to avoid: Sizes
235540 gz:69653 dist/jquery.js
82725 gz:29538 dist/jquery.min.js |
Yeah, that looks more compact. We could remove the gz: prefix and just make column headers to save a bit more. |
For reference, this is what the Closure Compiler UI shows:
Which is probably closer to what @dmethvin wants (values spread across columns instead of rows). |
Now that jQuery core has a map, the map file comes last. I think we can make the map file come second but it seems unnatural to do that. I'm never sure which assumptions are safest to make.
https://github.com/rwldrn/grunt-compare-size/blob/184f038119b4c4a0afba8a743d83bee755bda8bd/tasks/compare-size.js#L82
The text was updated successfully, but these errors were encountered: