[Libreoffice-bugs] [Bug 119286] Sanitize documents using "Find & Replace" getting slower and slower

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Sep 8 11:19:44 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=119286

--- Comment #14 from Noel Grandin <noelgrandin at gmail.com> ---
I have fixed one part of this

https://gerrit.libreoffice.org/c/core/+/102231

There are two more (which I don't intend to tackle)

(1) We repeatedly revalidate the paragraph signature. Since we're making
changes to individual words/letters, this is effectively O(n^2). A smarter
thing to do would be to only do this validation after the replace operation.

(2) We create a ton of small UNDO objects. Again, a smarter thing to do would
be to create a single UNDO operation.

The first one is tricky because it uses the UNO API to inspect the document,
while the rest of the code is using the internal raw API.

The second one is tricky because there are loops at multiple levels of the call
stack, and it's not clear how the responsibilities are shared across the
different calls.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200908/b3233779/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list