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

Planned improvements #234

Open
9 of 18 tasks
tdewolff opened this issue Nov 9, 2018 · 0 comments
Open
9 of 18 tasks

Planned improvements #234

tdewolff opened this issue Nov 9, 2018 · 0 comments

Comments

@tdewolff
Copy link
Owner

tdewolff commented Nov 9, 2018

Also see tdewolff/parse#44

  • Rename MinifyMimetype to MinifyBytes or similar, and accept []byte instead of io.Reader, make all other functions that explicitly convert to buffer.NewReader(b) to use this new function. Keep the original MinifyMimetype but mark as deprecated. unlikely due to insignificant performance gain
  • SVG paths: use S, Q, T, L or remove if (some) control points coincide for curved paths.
  • CSS: shorten dimensions, for example 200grad -> 180deg. But also 0ms -> 0s and 500ms -> .5s or .005s -> 5ms.
  • CSS: take care of comma separations in background
  • CSS: filter declaration blocks for duplicate property definitions, i.e. remove earlier background-position if either background or background-position is set afterwards
  • CSS: remove % from 0% where possible
  • CSS: minify aggregate declarations better, such as grid, transition, ...
  • CSS: find where the initial value is shorter than initial
  • CSS: remove dimension for zero values if possible
  • CSS: check if remove duplicate property definitions can be removed (see multiple background with -moz-linear-gradient, -ie-linear-gradient).
  • CSS: add implementation for more functions and value types, for example calc, min, max, clamp, transform + related functions in with (https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function), linear-gradient (ie. the <gradient> type) (https://developer.mozilla.org/en-US/docs/Web/CSS/gradient), and more.
  • CSS: find more optimizations from https://cssnano.co/optimisations/ and https://github.com/css/csso/tree/master/test/fixture/compress
  • cmd: refactor and separate reusable code
  • cmd: allow options input from command line, config file and environment variables
  • Find faster hash function
  • Set proper cap on parsers and helper functions, does this prevent the need for copy?
  • JS: use template strings where we can convert \n to a newline, as well as \r as a carriage return
  • JS: order var declarations without definition to improve GZIP
This was referenced Dec 10, 2018
tdewolff added a commit that referenced this issue Dec 3, 2019
…s for known CSS properties; improve rgb/hsl minification and add more properties that are minified; fixes #217 and advances towards #234
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

No branches or pull requests

1 participant