Open mstange opened 2 years ago
One big problem, as usual, is that the react render happens in the keydown handler, rather than from a requestAnimationFrame callback. So multiple keydowns are never batched.
I wonder if React 18 helps with that 🤔
I wonder if React 18 helps with that 🤔
This document says no:
Note: React only batches updates when it’s generally safe to do. For example, React ensures that for each user-initiated event like a click or a keypress, the DOM is fully updated before the next event.
Steps to reproduce:
Expected results: It should be snappy and fast.
Actual results: It is fairly sluggish.
Profile of sluggishness: https://share.firefox.dev/3lz1m5C
getTimingsForCallNodeIndex
(probably computing traced running time and implementation breakdown)getSamplesSelectedStates
, used in activity graph drawing. It is strange that we compute this from two different stacks: once in thegetSamplesSelectedStatesInFilteredThread
selector, and then again indrawCanvas
.computeActivityGraphFills
. Probably not much we can do about this.One big problem, as usual, is that the react render happens in the keydown handler, rather than from a requestAnimationFrame callback. So multiple keydowns are never batched.
┆Issue is synchronized with this Jira Task