[REVIEW 3-5] fdo#49208 ridiculous performance on certain .doc

Caolán McNamara caolanm at redhat.com
Tue May 1 08:43:33 PDT 2012


The .doc has some paragraphs in it that are around the 64k length mark.
It doesn't *look* like that's the case because they end in vast quantity
of whitespace and writer implements the word-compatibility thing to let
empty spaces disappear off the right side of the page rather than wrap.

Turns out to be a good test case for our break iterators, couple of
problems, squashed together as attachment

We create an icu string twice, once to compare it to a cached one, and
the second time to replace the cache if different
http://cgit.freedesktop.org/libreoffice/core/commit/?id=268ec2e64f89eb39fd5f02688787cd6f53e948b5

Better to index into a string instead of copying when "character"
counting
http://cgit.freedesktop.org/libreoffice/core/commit/?id=fd4fe85329654883a0bf3304ad0aa8ef0bfde844

icu's string compare is very very slow when you just want to check for
equality
http://cgit.freedesktop.org/libreoffice/core/commit/?id=ccc47b3db3eae25cc11bb709416c0b61747ca89e

and assume that a space doesn't combine with anything in any exotic way
to form a single grapheme
http://cgit.freedesktop.org/libreoffice/core/commit/?id=ae716b07f7218fadf0143de1946cc9e0e2c08744

C.


More information about the LibreOffice mailing list