Skip to content

Conversation

Rich-Harris
Copy link
Member

We use queue_idle_task in exactly one place — removing defaults from inputs. To my mind it really doesn't warrant this special treatment — you have to have hundreds of <input> elements with a server-rendered value or checked attribute before it takes more than a single millisecond to remove all those attributes, at least on this four year old machine, and if they don't have a value attribute then you're actually making things worse with requestIdleCallback.

Just feels like a bad use of our complexity budget.

I think we can actually go further in simplifying this — like, what if we didn't bother removing these attributes at all until the form in question gets reset? — but for now I'm focused on just removing queue_idle_task to unblock further simplifications as to how we schedule things.

Copy link

changeset-bot bot commented Sep 25, 2025

⚠️ No Changeset found

Latest commit: e874139

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

Playground

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

Copy link
Contributor

Choose a reason for hiding this comment

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

ty i love less complexity

@Rich-Harris Rich-Harris merged commit f0cede6 into main Sep 25, 2025
18 checks passed
@Rich-Harris Rich-Harris deleted the remove-idle-tasks branch September 25, 2025 17:45
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.

2 participants