<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Revalidate paragraph signatures only after find & replace operation is completed"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=136598">136598</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Revalidate paragraph signatures only after find & replace operation is completed
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>5.0.0.5 release
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Keywords</th>
<td>perf
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Writer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ilmari.lauhakangas@libreoffice.org
</td>
</tr></table>
<p>
<div>
<pre>Futher optimisation opportunity from <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Sanitize documents using "Find & Replace" getting slower and slower"
href="show_bug.cgi?id=119286#c14">bug 119286 comment 14</a>
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 <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=144181" name="attach_144181" title="Example file">attachment 144181</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=144181&action=edit" title="Example file">[details]</a></span>
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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>