Title: Measuring performance
We would like to measure performance of our CM6-based editor. We are tracing an "input lag" issue and would like to know how widespread this is.
We think a useful metric would be to measure the time between the user's keystroke and that character appearing on screen, or some rough approximation of those events.
We have prototyped a few different ideas, like watching for DOM changes via a MutationObserver
or patching dispatch
but have not found a satisfying solution. In particular we have struggled to detect when a character has been rendered, as opposed to other DOM changes.
Are there any known solutions or approaches to measuring this kind of performance with CM6? I can share the ideas that we have prototyped if wanted.