<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 - Sort dialog takes forever to load when many columns are selected"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=123640">123640</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Sort dialog takes forever to load when many columns are selected
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>6.2.0.1 rc
          </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>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Calc
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>Marcel.Waldvogel@uni-konstanz.de
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
When having selected many columns (e.g. by selecting entire rows or after
"Select All"), displaying the "Data→Sort…" dialog takes seemingly forever (>1
minute; operating systems asks whether to force quit LibreOffice).

Steps to Reproduce:
1. Open a new spreadsheet
2. Select several (or all) rows
3. Choose "Data→Sort…"
4. Wait

Actual Results:
LibreOffice is blocked for more than a minute, the operating system asks
whether to force quit the application (which I accepted twice, before becoming
patient enough). This can lead to user data loss.

Expected Results:
The process should be much faster (on the order of a second).



Reproducible: Always


User Profile Reset: No



Additional Info:
Despite not really knowing what LibreOffice does in that time, I still have
some suggestions on what could be done:

1. Speed up the loop inserting the column names into the dialog (maybe it is
even an O(n²) algorithm?)
2. Only insert columns which do have real data into the dialog</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>