Skip to content

v0.11.2

Latest

Choose a tag to compare

@github-actions github-actions released this 19 Nov 17:34
· 1 commit to main since this release

Rocket components around morphed content re-scope once per frame instead of once per patched element, so a frame patching hundreds of elements inside components no longer blocks the page for most of a second.

Fixed

Components

  • Rocket components around morphed content re-scope once per frame instead of once per patched element. Datastar's element patch sent datastar-scope-children to the nearest component around every element it morphed, and the component rewrote and applied the Datastar attributes of all its children each time. A frame patching 370 elements by id inside five sb-details took a 716 ms long task in headless Chromium (2.8 s at CPU 4x); with patches/rocket/0013 it re-scopes each component once, with no task over 50 ms (89 ms at 4x). Pages and pinned install snippets load the new build (/c/datastar@5f98646d7d3d/); on the official release the components work as before, only slower on such frames. Filed upstream as starfederation/datastar#1248.