Repository navigation
Visit a lone child straight away and skip the excess-attribute check when nothing changed - #206
Merged
joeldrapper merged 1 commit intoOct 10, 2026
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
joeldrapper
added this pull request to stack #207
October 8, 2026 16:57
joeldrapper
force-pushed
the
claude/project-thread-7y3nfe
branch
2 times, most recently
from
October 9, 2026 15:58
b2a7079 to
3544956
Compare
…when nothing changed When both sides have one child element of the same kind that only the kind pass can match, and nothing in the morph holds the user's changes, every pass would pair the two, so the child is visited without building the sibling matcher. The attribute pass also knows when every target attribute was already there; with equal counts there's nothing to remove. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJNvudrTrB2rfJaLWKRMsc
joeldrapper
force-pushed
the
claude/project-thread-7y3nfe
branch
from
October 9, 2026 16:07
3544956 to
738339e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Joel · project thread
Before: editing a deep tree (200 × depth 10) took 18.5 ms in Chromium, 3.6x morphdom's 5.2 ms, because every level built the sibling matcher and ran all its passes for a single child.
After: the same edit takes 7.8 ms (1.5x morphdom). Tables of 500 rows are 17–18% faster and a tiny text edit 31% faster. Other scenarios are unchanged within noise. Matching results don't change.
How:
#morphChildNodesvisits the child directly instead of buildingSiblings.#visitAttributesnotes whether every target attribute was already there with the same value. With equal attribute counts there can't be any excess, sohasExcessAttributesis skipped.Benchmark (Chromium, lower quartile of 21 rounds, against #205's head):
Stacked on #205. The full suite passes with 100% coverage, plus deep local fuzz runs (5,000 tree seeds and the matching, preserve, move and form fuzzers).
🤖 Generated with Claude Code
https://claude.ai/code/session_01VJNvudrTrB2rfJaLWKRMsc