Page MenuHomePhabricator

Pasting lots of text into the new wikitext editor takes very long
Closed, DuplicatePublic8 Estimated Story Points

Description

P4905 is a test file I made to debug remarkup/wikitext conversion. Pasting it into an empty edit window freezed the editor for several seconds, even though I pasted via shift-ctrl-v (which in theory should not be doing any kind of processing on the pasted text).

Tested on Chrome 55 / Ubuntu 16.04.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

On master, pasting that into NWE took a couple of seconds; special-pasting took about three seconds; and pasting it into VE (and thus parsing it from wikitext into HTML) took about 14 seconds. Can you confirm? Ideally this'd be faster, but I'm not sure what the bottleneck is. Probably browser DOM creation?

Jdforrester-WMF moved this task from To Triage to Freezer on the VisualEditor board.

Is there a test install where I can try master without having to set it up locally?

If you ask whether I can confirm on the production version, special-pasting seems actually slightly slower to me than pasting. Pasting in VE is 10+ sec, which is unfortunate but understandable (it does a wikitext -> HTML conversion). As far as I understand special-paste should just update a text node, and normal paste should do the same after parsing the text and figuring out that it's does not contain rich formatting, so they should be immediate.

Is there a test install where I can try master without having to set it up locally?

Master is available in the Beta Cluster (so https://en.wikipedia.beta.wmflabs.org/wiki/User:Jdforrester_(WMF)/sandbox?veaction=editsource etc.).

As far as I understand special-paste should just update a text node, and normal paste should do the same after parsing the text and figuring out that it's does not contain rich formatting, so they should be immediate.

Sadly not; each paragraph is its own node. Pasting a 1829-line bunch of text means creating 1829 DOM nodes.

Ah, thanks. I thought VE is submodule'd and you meant its master.

I get the same timing you describe (normal paste is indeed slower than special-paste there).

This comment was removed by Izno.