Bug 136598 - Revalidate paragraph signatures only after find & replace operation is completed
Summary: Revalidate paragraph signatures only after find & replace operation is completed
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
: 136602 (view as bug list)
Depends on:
Blocks: Performance
  Show dependency treegraph
 
Reported: 2020-09-09 10:12 UTC by Buovjaga
Modified: 2023-05-10 14:51 UTC (History)
2 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 Buovjaga 2020-09-09 10:12:45 UTC
Futher optimisation opportunity from bug 119286 comment 14

Quote:
"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."

This "is tricky because it uses the UNO API to inspect the document, while the rest of the code is using the internal raw API"

Perf can be tested like so:
1. Open attachment 144181 [details]
2. Disable the automatic spell checking if enabled
3. In the Search for field put "." (a single period)
4. In the Replace with field put "x"
5. Make sure Whole words only is unchecked
6. Click Other Options to expand the dialog, and make sure Regular expressions is checked
7. Click Replace All
Comment 1 Buovjaga 2020-09-09 11:32:19 UTC
*** Bug 136602 has been marked as a duplicate of this bug. ***