Skip to content

v0.3.1

Choose a tag to compare

@dkropachev dkropachev released this 20 Mar 00:01
· 62 commits to main since this release

Performance optimizations

Comprehensive render pipeline optimizations delivering 20-110% throughput improvements across key scenarios, with no API or behavior changes.

Highlights

Scenario Improvement
xh-if true +113%
4 class toggles +93%
1 text bind render+swap +48%
xh-if false +40%
nav menu 8 items +26%
counter update +20%
list 50 update +22%

Changes

  • Pre-compute numeric binding type codes in render plan
  • Skip child creation when xh-text/xh-html will overwrite
  • textContent = '' instead of innerHTML = "" in performSwap
  • Batch classList.add calls in plan bindings
  • Single instanceof MutableDataContext check per render
  • Shared frozen PROCESSED_STATE constant
  • WeakSet replaces data-xh-each-item setAttribute
  • Eliminate renderItem closure in plan-based processEach
  • Compiled render plans with direct DOM creation
  • Inline plan bindings bypass DOM setAttribute round-trip
  • Eliminate redundant DOM scans, cache hot paths, fix resource leaks

See CHANGELOG.md for full details.