budget-api icon indicating copy to clipboard operation
budget-api copied to clipboard

[TAG] Per-operation budgets?

Open slightlyoff opened this issue 8 years ago • 1 comments

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.

slightlyoff avatar Apr 29 '17 05:04 slightlyoff

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.

beverloo avatar May 24 '17 17:05 beverloo