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

Description

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

bzimport set Reference to bz52012.
tstarling created this task.Via LegacyJul 25 2013, 4:59 AM
gerritbot added a comment.Via ConduitJul 25 2013, 1:37 PM

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

https://gerrit.wikimedia.org/r/75863

gerritbot added a comment.Via ConduitJul 25 2013, 10:11 PM

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

https://gerrit.wikimedia.org/r/75863

Jdforrester-WMF added a comment.Via ConduitJul 25 2013, 11:10 PM

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

Add Comment