Closed balazsbajorics closed 2 months ago
@balazsbajorics Is this ticket still relevant?
Note: for labels scrubbing, the performance (at least in vanilla project) is now more than adequate (prob result of #6196 and other performance improvements)
Turns out this actually done not blocked; closing!
When dragging the border radius slider of the PromiseCard component, we can see egregious performance:
The entire render would be bad enough at 55ms, but we accidentally run it twice because an activating MutationObserver and ResizeObserver.
These observers do not create accidental re-renders during on-canvas interactions, which is where we tested them, so that's good.
BUT the entire system is not fine grained and were designed in a more naive time: 1: we invalidate the entire scene, not just the element 2: it's not controlled when should this dom-walker run happen then 3: we should either rely on the observers OR on the canvas interaction, but not both 4: the dom-walker should never walk entire subtrees during interactions
Possible ideas for building a better solution:
TLDR end goal is that during an interaction, we really only call getComputedStyle for a handful of elements, and spend almost zero time on merging large jsxMetadata trees etc. ideally ALL OF the metadata update should take 0.1-0.2ms per frame instead of 7-10ms of today