script: Use unrooted iterators for HTMLCollections - #45582
Merged
Conversation
Narfinger
force-pushed
the
faster-iterators
branch
from
June 11, 2026 12:13
f5385af to
b7d75c3
Compare
|
🔨 Triggering try run (#27345803471) for Linux (WPT) |
|
Test results for linux-wpt from try job (#27345803471): Flaky unexpected result (54)
Stable unexpected results that are known to be intermittent (13)
|
|
✨ Try run (#27345803471) succeeded. |
Narfinger
marked this pull request as ready for review
June 11, 2026 14:25
Narfinger
force-pushed
the
faster-iterators
branch
from
June 12, 2026 08:02
b7d75c3 to
b24395b
Compare
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Narfinger
force-pushed
the
faster-iterators
branch
from
June 15, 2026 07:48
b24395b to
051b359
Compare
jdm
approved these changes
Jun 16, 2026
jdm
left a comment
Member
There was a problem hiding this comment.
Great! The fact that this is statically checked gives me a lot more confidence in reviewing changes like this one.
TG199
pushed a commit
to TG199/servo
that referenced
this pull request
Jun 21, 2026
This implements two new UnrootedIterators (PreceedingNodeIterator and FollowingNodeIterator) with the same schema as the other UnrootedIterators. This also implements using these iterators for HTMLCollections (and their subtypes) and CollectionSource trait as well as a couple of downstream. Special care should be given to check: - The correctness of the new iterators from the point of iterating. - The enum CollectioonKind not having the 'static lifetime anymore. - HTMLFormControlsCollection::NamedItem (which had to be rewritten to make the lifetimes work). - Bugfix in codegen.py to also check the cx._no_gcMethods for Length(cx). - Implementation of PartialEq for UnrootedDom and UnrootedDom<T>==T Most other changes are mechanical &JSContext adding or NoGC propagating. Overall this seems to eliminate rooting overhead on amazon.com down from 1.8% runtime in a small unscientific test. Testing: WPT tests should find any screwups. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
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.
This implements two new UnrootedIterators (PreceedingNodeIterator and FollowingNodeIterator) with the same schema as the other UnrootedIterators.
This also implements using these iterators for HTMLCollections (and their subtypes) and CollectionSource trait as well as a couple of downstream.
Special care should be given to check:
Most other changes are mechanical &JSContext adding or NoGC propagating.
Overall this seems to eliminate rooting overhead on amazon.com down from 1.8% runtime in a small unscientific test.
Testing: WPT tests should find any screwups.