This release sharpens the edge of TriFrost's JSX engine and style system. Expect better render performance, faster style injection, and smarter cross-request reuse — with no increase in memory footprint.
Improved
- perf: The JSX render() engine has been improved with tighter branching and more predictable control flow — eliminating unnecessary conditionals and improving hot path performance.
- perf: The styleEngine now internally caches
css()
andcss.use()
results per request — dramatically reducing style generation overhead in loops, conditionals, and dynamic blocks. - perf: Each css factory instance now also has a global LRU cache allowing cross-request replay of styles. If a given style object has already been processed on a previous request, it will replay its previously registered rules into the new style engine — without flattening or recomputing anything.
These changes deliver an estimated 15–20% render performance boost :rocket: (based on vitest bench snapshots of common JSX trees), without sacrificing determinism or memory safety.
Previous:
Current:
PS: The code for this benchmark lives here