[Libreoffice-bugs] [Bug 129037] New: BASIC: Selecting items in a visible list box in a dialog is very slow

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Nov 26 11:19:58 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=129037

            Bug ID: 129037
           Summary: BASIC: Selecting items in a visible list box in a
                    dialog is very slow
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: mikekaganski at hotmail.com

Created attachment 156124
  --> https://bugs.documentfoundation.org/attachment.cgi?id=156124&action=edit
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20191126/29602b66/attachment.html>


More information about the Libreoffice-bugs mailing list