<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 - Improvement find & replace performance"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=136602">136602</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Improvement find & replace performance
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>7.1.0.0.alpha0+ Master
          </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>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>xiscofauli@libreoffice.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This enhancement is based on
<a class="bz_bug_link 
          bz_status_VERIFIED  bz_closed"
   title="VERIFIED FIXED - Sanitize documents using "Find & Replace" getting slower and slower"
   href="show_bug.cgi?id=119286#c14">https://bugs.documentfoundation.org/show_bug.cgi?id=119286#c14</a>

(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.</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>