Bug 136602 - Improvement find & replace performance
Summary: Improvement find & replace performance
Status: RESOLVED DUPLICATE of bug 136598
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks:
 
Reported: 2020-09-09 11:09 UTC by Xisco Faulí
Modified: 2020-09-09 11:33 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2020-09-09 11:09:40 UTC
This enhancement is based on https://bugs.documentfoundation.org/show_bug.cgi?id=119286#c14

(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.
Comment 1 Buovjaga 2020-09-09 11:32:19 UTC

*** This bug has been marked as a duplicate of bug 136598 ***