Skip to content

Performance

Compare
Choose a tag to compare
@tdewolff tdewolff released this 21 Apr 19:53
· 570 commits to master since this release

This is v2 that works with minify-v2 and the buffer package. It is mostly a performance upgrade from v1.1.0. Also refactored tests and increased test coverage. Some minor API changes have been made, namely the Next() methods now return TokenType and []byte but not the total shifted number of bytes (used for freeing up bytes from the underlying buffer). This now happens through calling Free(int) on the underlying buffer.

Changelog:

  • functionality move between parse and other packages
  • differentiate between (raw) data and text for tokens
  • keep newlines when reducing whitespace
  • keep bang-comments

Bugfixes:

  • HTML/XML: don't panic on empty end tags
  • JS: don't panic on EOF in template
  • XML: don't panic on early ending CDATA