<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 - BASIC: Selecting items in a visible list box in a dialog is very slow"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=129037">129037</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>BASIC: Selecting items in a visible list box in a dialog is very slow
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>BASIC
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>mikekaganski@hotmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=156124" name="attach_156124" title="A sample library for listbox item selection testing, packed as extension">attachment 156124</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=156124&action=edit" title="A sample library for listbox item selection testing, packed as extension">[details]</a></span>
A sample library for listbox item selection testing, packed as extension

Having a list box with many elements, and running code like

        Dim selItems(1000)
        For i = lBound(selItems) To uBound(selItems)
                selItems(i) = i
        Next i
        oListBox.selectItemsPos(selItems, true)

is very slow, especially compared to doing the same with the list box hidden
(i.e., the call to selectItemsPos wrapped into calls to
setVisible(false)...setVisible(true)).

In debug build, the process of the selection is actually visible, i.e. not an
atomic operation, despite not multiple selectItemPos called, but a single
selectItemsPos.

The attachment contains a basic module and a dialog in a library, exported as
an extension for convenience; to test, install the OXT, and run Main in
ListBoxTest/Module1. All three buttons below the list box in the dialog allow
to deselect then re-select everything; they show elapsed time in seconds after
the run.</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>