display-locking icon indicating copy to clipboard operation
display-locking copied to clipboard

updateRendering: What happens with multiple subtree calls?

Open vmpstr opened this issue 3 years ago • 2 comments

What should happen if there is a descendant chain of elements all of which have content-visibility: hidden and all of which get a call to updateRendering?

It is likely that the update budget of the ancestors will cause us updates in descendants which will themselves be budgeted. Is this OK?

vmpstr avatar Sep 08 '21 14:09 vmpstr

Could you clarify what you mean by "update budget" here? I'm having some trouble wrapping my head around this scenario.

noahlemen avatar Sep 10 '21 15:09 noahlemen

I mean if we have something like

<div id=a renderPriority=background>
 ...
 <div id=b renderPriority=background>
  ...
  <div id=c renderPriority=background>
  ...

Then we would update #a with background priority, which very likely means that we have some time budget within which we will do the work (this is an implementation detail that is tbd). If we exceed the budget, then we will yield and resume the next frame. However, since #b and #c and everything else is also background priority, it would presumably have their own time budgets. Or maybe they share #a's budget.

I'm just not sure exactly what is desired in this situation, but I admit that this is very likely an implementation detail that won't really matter for the use-cases we have.

vmpstr avatar Sep 15 '21 17:09 vmpstr