WICG / budget-api

Proposal for a Budget API
https://wicg.github.io/budget-api/
Other
26 stars 11 forks source link

[TAG] Per-operation budgets? #16

Open slightlyoff opened 7 years ago

slightlyoff commented 7 years ago

From TAG feedback issue

getBudget() appears to be global and not a per-operation-type budget. Have you consulted with other browsers to ensure that this is a reasonable design choice for their implementations? This has been a source of difficulty for storage quota in the past.

beverloo commented 7 years ago

This is a great question that we have not yet received feedback on beyond the Chrome team.

This is a difference that will materially impact the shape of the getBudget() and getCost() methods. Having multiple budgets means we have to separate more concepts: they might decay (or gain budget) at different rates, which makes it really tough to reason about how to decide whether operations [X, Y, Z] can happen at a certain point in the future.