Page MenuHomePhabricator

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

Details

Reference
bz52012

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:44 AM
bzimport set Reference to bz52012.

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

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

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

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

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