Skip to content

script: Use NoGC for note_dirty_element - #47165

Merged
TimvdLippe merged 2 commits into
servo:mainfrom
Narfinger:restyle-no-gc
Aug 11, 2026
Merged

TimvdLippe merged 2 commits into
servo:mainfrom
Narfinger:restyle-no-gc

Conversation

@Narfinger

@Narfinger Narfinger commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

This uses the NoGC framework for note_dirty_element.
This replaces the inclusive_ancestors_in_flat_tree with an unrooted variant.
Additionally, parent_in_flat_tree now always returns an unrooted value as it was easier then implementing the logic separately and a new FlatTreeParent struct.
In the cases where we still need the rooted version we use the 'as_rooted()' function.

The rest of the changes is just "bubbling up" the NoGC parameter.
This saves us in total a 0.2% cpu in a busy script thread slice on walrusaudio.com

Testing: This changes just the rooting behavior, hence, no extra tests are necessary.

@Narfinger Narfinger changed the title script: Use NoGC for restyle script: Use NoGC for note_dirty_element Aug 11, 2026
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
@Narfinger
Narfinger marked this pull request as ready for review August 11, 2026 15:51
@Narfinger
Narfinger requested a review from gterzian as a code owner August 11, 2026 15:51
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 11, 2026
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Aug 11, 2026
@TimvdLippe
TimvdLippe added this pull request to the merge queue Aug 11, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Aug 11, 2026
Merged via the queue into servo:main with commit b49e982 Aug 11, 2026
33 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Aug 11, 2026
@Narfinger
Narfinger deleted the restyle-no-gc branch August 12, 2026 07:16
eachra-bawn pushed a commit to eachra-bawn/servo that referenced this pull request Aug 12, 2026
This uses the NoGC framework for note_dirty_element.
This replaces the `inclusive_ancestors_in_flat_tree` with an unrooted
variant.
Additionally, parent_in_flat_tree now always returns an unrooted value
as it was easier then implementing the logic separately and a new
FlatTreeParent struct.
In the cases where we still need the rooted version we use the
'as_rooted()' function.

The rest of the changes is just "bubbling up" the NoGC parameter.
This saves us in total a 0.2% cpu in a busy script thread slice on
walrusaudio.com

Testing: This changes just the rooting behavior, hence, no extra tests
are necessary.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
RichardTjokroutomo pushed a commit to RichardTjokroutomo/servo that referenced this pull request Oct 6, 2026
This uses the NoGC framework for note_dirty_element.
This replaces the `inclusive_ancestors_in_flat_tree` with an unrooted
variant.
Additionally, parent_in_flat_tree now always returns an unrooted value
as it was easier then implementing the logic separately and a new
FlatTreeParent struct.
In the cases where we still need the rooted version we use the
'as_rooted()' function.

The rest of the changes is just "bubbling up" the NoGC parameter.
This saves us in total a 0.2% cpu in a busy script thread slice on
walrusaudio.com

Testing: This changes just the rooting behavior, hence, no extra tests
are necessary.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants