In the case where a user pastes in another huge article or makes an extremely large number of complex changes throughout a large document, the visual diff can sometimes take a long time to calculate or cause the user’s browser to freeze. This was reported by a user who pasted 1,000+ lines of complex wikitext into another article. We should investigate this situation.
In the example given, a lot of the time was spent putting the visual diff document html together. The problem is, we make the html from the visual editor linear data, and given the way that works, <del> and <ins> have to be added as annotations to each character, so when we are dealing with several hundred paragraphs, all inserted or deleted in their entirety, this takes a long time. One way round this is to bypass the normal visual editor converter when making html for the diff document, so we can add those tags directly.
Visual Diff is still completely failing on large diffs. Tested in three browsers on two computers.
- Use 2017 Editor at EnWiki article United States.
- Search and replace all instances of United States with U.S.
- View Wikitext diff. Works.
@Alsee: Please file separate tasks for separate specific issues. This task is about investigating which has happened (whether it was "enough investigation" depends on personal points of views, I guess). Extending the task's scope to have one catch-all task for performance issues with visual diffs is not feasible.
Thanks for your understanding.