Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable task priority for IDBRequest and IDBTransaction? #428

Open
SteveBeckerMSFT opened this issue Oct 1, 2024 · 1 comment
Open
Labels
TPAC2024 Topic for discussion at TPAC 2024

Comments

@SteveBeckerMSFT
Copy link

TPAC 2024: The Prioritized Task Scheduling API shipping in Chromium introduces JavaScript task prioritization where applications can post tasks with high priority and background priority. Should we provide a way for developers to set the priority of the JavaScript tasks associated with IDBRequests and IDBTransactions?

For example, an application could indicate that an IDB read request is user blocking when the application needs results from IDB to load or display. Setting a user blocking priority could increase the priority of the JavaScript event tasks associated with the IDBRequest and IDBTransaction.

@SteveBeckerMSFT SteveBeckerMSFT added the TPAC2024 Topic for discussion at TPAC 2024 label Oct 1, 2024
@evanstade
Copy link

My first inclination would be to be able to set this on the level of the entire IDB database. It will be easier to implement and reason about that way. Also because transactions block each other, so it's not particularly useful to be able to add a high priority transaction behind a low priority one.

And from an API perspective, I would suggest adding it via Storage Buckets. IDB is probably not the only storage API that could benefit from this, and one of the main advantages of Storage Buckets is to not have to update N APIs every time a generally useful dial, such as this one, is added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TPAC2024 Topic for discussion at TPAC 2024
Projects
None yet
Development

No branches or pull requests

2 participants