Typing plain text into a large page is very slow
Closed, ResolvedPublic


On [[Argentina]] on Firefox on my laptop, typing plain text takes about 380ms per character, assuming I am interpreting the profiling correctly, meaning you can type faster than it can update.

This is predominantly because ve.dm.Surface.prototype.change() calls truncateUndoStack(), which unconditionally sends the "history" event despite there normally being no changes to the redo buffer. The history event causes ResizableNode and RelocatableNode instances to perform several jQuery.css() calls, which apparently are very slow.

I confirmed that disabling truncateUndoStack() using the JS console causes typing to become much faster.

Version: unspecified
Severity: normal



Change 75863 had a related patch set uploaded by Esanders:
Optimise history stack truncation


Change 75863 merged by jenkins-bot:
Optimise history stack truncation


Now fixed in master and will be deployed in a few minutes' time.

Add Comment