Skip to content

v2.0.1

Choose a tag to compare

@arthurfiorette arthurfiorette released this 11 Sep 05:43
· 566 commits to master since this release

Breaking Changes

  • html.compile now only accepts functions, which is not backwards compatible with v1.x, read mode.
  • Migrated namespace from html to Html (capital H), which reduces on naming collisions as html is a pretty common variable name.
  • Added @kitajs/html/register to avoid the need of importing Html on each and every file.
  • Other things remained unchanged

Important Changes

  • Improved performance and benchmarks.

Benchmark

  • 2023-09-11T00:53:49.607Z
  • Node: v18.16.0
  • V8: 10.2.154.26-node.26
  • OS: darwin
  • Arch: arm64

Hello World

Runs @kitajs/html typed-html + .compile() + / @kitajs/html + / typed-html
10 0.0063ms 0.0107ms 1.68x 0.0013ms 5.07x 8.53x
10000 1.632ms 4.848ms 2.97x 0.9131ms 1.79x 5.31x
100000 9.4629ms 19.367ms 2.05x 2.3115ms 4.09x 8.38x

Many Props

Runs @kitajs/html typed-html + .compile() + / @kitajs/html + / typed-html
10 0.4629ms 1.3898ms 3x 0.0025ms 182.19x 547.04x
10000 372.5842ms 840.7459ms 2.26x 0.6308ms 590.66x 1332.84x
100000 3438.7935ms 7706.0509ms 2.24x 3.7163ms 925.32x 2073.56x

Big Component

Runs @kitajs/html typed-html + .compile() + / @kitajs/html + / typed-html
10 0.3075ms 0.8844ms 2.88x 0.0037ms 81.99x 235.85x
10000 222.5096ms 521.0473ms 2.34x 0.7118ms 312.61x 732.02x
100000 2211.6316ms 5229.3416ms 2.36x 4.1123ms 537.82x 1271.65x

Full Changelog: v2.0.0...v2.0.1