Pasting lots of text into the new wikitext editor takes very long
Open, LowPublic8 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.

Related Objects

Tgr created this task.Feb 7 2017, 2:39 AM
Restricted Application added a project: VisualEditor. · View Herald TranscriptFeb 7 2017, 2:39 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Tgr updated the task description. (Show Details)Feb 7 2017, 2:45 AM

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 triaged this task as Low priority.Feb 7 2017, 8:06 PM
Jdforrester-WMF moved this task from To Triage to Backlog on the VisualEditor board.
Tgr added a comment.Feb 7 2017, 8:57 PM

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.

Tgr added a comment.Feb 7 2017, 9:13 PM

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).

Dvorapa added a subscriber: Dvorapa.Mar 7 2017, 7:43 PM
Jdforrester-WMF set the point value for this task to 8.