Research performance issues
Performance seems to be problematic, especially when the editor has been left open for a while.
The most likely culprit is event listeners that seem to be multiplied as time goes by.
A good first step would be to track how many listeners we have on opening the editor.
Then we should see why those listeners get increased.
If a listener is registered on didMount
or in the constructor
, there's no reason for them to be re-registered, unless there is an unexpected remount of the components (maybe through a larger surface rerender?).
In any case, we should try to
- limit re-mounts to only necessary ones
- make sure that events get de-registered if a component is destroyed
The expected outcome would be that the number of event listeners should remain fairly stable during the lifecycle of the editor being mounted.
If these don't work, we should identify any potential problems with the underlying library and report them.