perf(runtime-tags): let a conditional bound its own section - #3711
perf(runtime-tags): let a conditional bound its own section#3711DylanPiercey wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 4f6aeaa The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3711 +/- ##
==========================================
+ Coverage 90.34% 90.35% +0.01%
==========================================
Files 414 414
Lines 19746 19767 +21
Branches 3615 3626 +11
==========================================
+ Hits 17840 17861 +21
Misses 1367 1367
Partials 539 539 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
A conditional that is a section's only content already has well defined bounds, so the section emits no markers or anchor and the rendered branch is its range. Owners holding the replaced range follow it on each swap. While the conditional renders nothing its anchor bounds the section, so a missing `<else>` needs no markers either. Measured ~12% off rebuilding a large keyed list, and drops every comment marker the conditional produced (42 to 0 in a chat fixture).
a7553fc to
4f6aeaa
Compare
|
Superseded by #3712, which gates the same two |
A section whose only content is an
<if>chain was still emitting boundary markers and an anchor to delimit a range the conditional's own branch already bounds — three comment nodes per item for a<for>over a conditional. The section now emits none of them, and the rendered branch is the section's range; on each swap the conditional retargets any owner still holding the replaced range. When the chain renders nothing its anchor bounds the section instead, so this covers a chain with no<else>as well.Worth ~12% on rebuilding a large keyed list, and removes every comment marker the conditional produced (42 to 0 in a chat-style fixture, matching a markerless framework's node count exactly). Costs +84 bytes brotli.