<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 - Create a single undo operation for find & replace"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=136599">136599</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Create a single undo operation for find & replace
          </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 create a ton of small UNDO objects. Again, a smarter thing to do would be
to create a single UNDO operation."

This "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."

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>