Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: avoid microtask in flushSync#16394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Rich-Harris merged 4 commits intomainfromavoid-microtask-in-flushsync
Jul 16, 2025

Conversation

Rich-Harris
Copy link
Member

file this under 'things that don't matter at all in the real world but matter a great deal in benchmarks'

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC:https://github.com/sveltejs/rfcs
  • Prefix your PR title withfeat:,fix:,chore:, ordocs:.
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.
  • If this PR changes code withinpackages/svelte/src, add a changeset (npx changeset).

Tests and linting

  • Run the tests withpnpm test and lint the project withpnpm lint

@changeset-botchangeset-bot
Copy link

changeset-botbot commentedJul 16, 2025
edited
Loading

🦋 Changeset detected

Latest commit:282cd94

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
NameType
sveltePatch

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

@github-actionsGitHub Actions
Copy link
Contributor

Playground

pnpm add https://pkg.pr.new/svelte@16394

@Rich-Harris
Copy link
MemberAuthor

In case this seems unnecessary:

sbench_create_signals  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼  370.47ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 385.32ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼  160.90ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 173.83mssbench_create_0to1  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 5.50ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 5.54mssbench_create_1to1  time: fastest is b (main)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 20.92ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 20.86ms  gc_time: fastest is b (main)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 2.95ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 2.88mssbench_create_2to1  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 18.23ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 18.39ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 2.95ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 2.97mssbench_create_4to1  time: fastest is b (main)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 16.94ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 16.82ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼  2.91ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 2.99mssbench_create_1000to1  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 15.17ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 15.31ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼  3.03ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 3.13mssbench_create_1to2  time: fastest is b (main)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 10.14ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 10.13ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼  0.75ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 0.78mssbench_create_1to4  time: fastest is b (main)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 8.60ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 8.50ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼    0.55ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 0.63mssbench_create_1to8  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼   6.32ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 6.90mssbench_create_1to1000  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 8.21ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 8.28ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼  0.63ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 0.68mskairo_avoidable_owned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼              496.03ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 1397.77ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼                    35.21ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 679.47mskairo_avoidable_unowned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼            595.58ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 1307.73ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼                    36.39ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 609.89mskairo_broad_owned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼  476.75ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 509.22ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼                   1.93ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 17.15mskairo_broad_unowned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼  473.87ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 508.22ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼                   1.93ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 17.46mskairo_deep_owned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼   205.71ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 228.45ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼                   1.69ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 16.43mskairo_deep_unowned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼  949.68ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 980.03ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼                   2.03ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 17.07mskairo_diamond_owned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼         411.28ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 684.22ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼                   19.78ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 223.92mskairo_diamond_unowned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼        506.73ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 778.16ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼                   19.53ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 222.74mskairo_triangle_owned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼      126.25ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 167.67ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼                   3.43ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 31.46mskairo_triangle_unowned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼    245.34ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 288.21ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼                   3.39ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 32.83mskairo_mux_owned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼  328.86ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 344.89ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼               2.62ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 9.41mskairo_mux_unowned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼  486.95ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 507.78ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼               3.30ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 10.61mskairo_repeated_owned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼        78.36ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 123.92ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼                   2.94ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 34.61mskairo_repeated_unowned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼         75.80ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 122.41ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼                   3.34ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 32.98mskairo_unstable_owned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼      114.68ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 158.05ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼                   3.48ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 33.52mskairo_unstable_unowned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼      129.37ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 173.25ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼                   3.52ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 33.59msmol_bench_owned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼  286.24ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 294.20ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼                  1.03ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 6.22msmol_bench_unowned  time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼  304.55ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 312.96ms  gc_time: fastest is a (avoid-microtask-in-flushsync)    a: ◼◼◼                  0.85ms    b: ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼ 6.57ms

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

craziness

@Rich-HarrisRich-Harris merged commit4947283 intomainJul 16, 2025
15 checks passed
@Rich-HarrisRich-Harris deleted the avoid-microtask-in-flushsync branchJuly 16, 2025 16:08
@github-actionsgithub-actionsbot mentioned this pull requestJul 16, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@elliott-with-the-longest-name-on-githubelliott-with-the-longest-name-on-githubelliott-with-the-longest-name-on-github approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Rich-Harris@elliott-with-the-longest-name-on-github

[8]ページ先頭

©2009-2025 Movatter.jp