As a workaround for the performance regression
from commit 2d3c77e9b1
(tdf#109266 sw change tracking: track transliteration),
switch off redlining to avoid ~freezing, if a single
transliteration could result too many (>~500) redlines.
A single transliteration creates n redlines
for n paragraphs of the selected text, except in
the case of transliterating to title case, where it
creates n redlines for n words. It's very easy
to freeze Writer, because Writer's slowing down with
n redlines is described by an O(n²) (quadratic) time
complexity. Eg. in an experiment, title casing
~660 words was 6 sec, but ~3000 words was 85 sec,
regarding to creating 660 vs 3000 redlines.
Note: this is a partial revert of commit
2d3c77e9b1, if the
selection contains more than 500 paragraphs (or in the
case transliterating to title case, ~500 words).
Change-Id: Iad98943cc9e1ed64aa9779e49ee3e941abad02ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111637
Tested-by: Jenkins
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>