lustre-labs / lustre

An Elm-inspired framework for building HTML templates, single page applications, and server-rendered components in Gleam!
https://hexdocs.pm/lustre
MIT License
727 stars 52 forks source link

⚡️ Optimise escape function #133

Closed giacomocavalieri closed 2 weeks ago

giacomocavalieri commented 1 month ago

This PR replaces the escape function with an implementation optimised specifically for each target:

Also it would be nice if we had a "real" page to render and see the actual difference in performance between the two implementations when used in a realistic scenario, it's always nice to boast about perf improvements 😎