Operations of files with big lists (ordered/unordered) take a lot of time #3504
Description
Hello, I've found a curious behaviour when working with files containing big lists (around 400 lines of ordered or unordered lists).
When I try to execute operations from the menu (indent, unindent, turn into ordered/unordered list) on these files, they tend to take a lot of time to process, even causing Firefox to ask me to quit the page.
Of course, the larger the file is, the longer it takes.
This doesn't happen to files with a huge amount of regular lines. Therefore I would expect the operation to compute in a time which is proportional to the number of "special" lines, assuming that there is need to update each "special" line separately (numbering for ordered lists, ? for unordered lists).
But additionally, the number of lines processed by the operation ("indent 20 lines" for instance) makes it worse. I then assume that each line is processed separately.
Therefore, indenting 20 lines of a 400 "special" line file takes about 30 seconds, while it's half a second or so for regular lines file.
May be related to #2297 in some ways !
Xubuntu 18.04, Firefox 63.0