Skip to content

Instantly share code, notes, and snippets.

@40thieves
Last active September 13, 2022 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 40thieves/bb3f2da4b14c02ab870a69d6c84ddcaa to your computer and use it in GitHub Desktop.
Save 40thieves/bb3f2da4b14c02ab870a69d6c84ddcaa to your computer and use it in GitHub Desktop.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment