Repository navigation
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-childrento 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 fivesb-detailstook a 716 ms long task in headless Chromium (2.8 s at CPU 4x); withpatches/rocket/0013it 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.