Skip to content
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

Don't minify for printing size if --info is not requested #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

goto-bus-stop
Copy link

@goto-bus-stop goto-bus-stop commented Mar 2, 2018

PrintUtil.startLog(minify(cssString).length)

This line was always minifying the input with clean-css, and then
discarding it if options.info was not set.

Running purifycss without options.info on a
small app using tachyons:

  • Before: 302.531ms
  • After: 133.599ms

(Built bundle.js and bundle.css files used for this comparison: https://gist.github.com/goto-bus-stop/40b6b39ed34bd215c8dd0ed274cd2230)

This line was always minifying the input with `clean-css`, and then
discarding it if `options.info` was not set.

Running purifycss without `options.info` on a
[small app using tachyons](https://github.com/choojs/bankai/tree/master/example):

  - Before: 302.531ms
  - After: 133.599ms
@goto-bus-stop
Copy link
Author

This is a cheap fix with big gains—any chance of getting it in soon? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant