Bug 131000 - Form control property editor for combo box opens very slow for large entry list
Summary: Form control property editor for combo box opens very slow for large entry list
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.1.6.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.3 target:6.3.6 target:7.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-28 06:04 UTC by Jan-Marek Glogowski
Modified: 2021-02-26 07:59 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Combo box with 4000 entries from Calc cells (26.01 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-02-28 06:07 UTC, Jan-Marek Glogowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Marek Glogowski 2020-02-28 06:04:48 UTC
Description:
When opening the property editor dialog to edit the combo box in the attached bug document with 4000 entries, LO is stuck busy for a long time, without UI refresh and no possibility for the user to interact with the program. You literally have to wait minutes until LibreOffice becomes responsive again here.

There is no problem using the combo box itself, just the property editor in design mode.

This happens, because the combo box entries are kept in a small MultiLineEdit text field. LO is busy formating that text, which doesn't fit at all in the line. A debugger shows it's stuck the whole time in TextEngine::CreateLines. This was unintentionally already fixed in master by commit 1efeb17837c2 ("weld Property Browser"), which completely changed this line editor (and other parts of the dialog) into a single line Edit field and a TextView in a popup menu. But the patch itself "weld"es the whole dialog (68 files changed, 2124 insertions, 2871 deletions) and is much too large for a backported fix.

But the real solution is simple: just replace the MultiLineEdit with an Edit. The real editing is done in the dropdown anyway, so no functionally is really lost. The one difference is the fact, that now you never can edit the text directly, but just in the popup. That cuts down the time from minutes to a few seconds here.

The handling could probably be optimized further, as the content is based on Calc cells, so you can't even edit the entries in the case, but for a "backport", the result is sufficient.

Steps to Reproduce:
1. Open bug document
2. Switch to design mode
3. Open the combo box "Control..." properties

Actual Results:
LO is busy looping without UI refresh.

Expected Results:
LO is interactive.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.1.6.3
Build ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: kde4; 
Locale: de-DE (de_DE.UTF-8); Calc: group threaded
Comment 1 Jan-Marek Glogowski 2020-02-28 06:07:31 UTC
Created attachment 158245 [details]
Combo box with 4000 entries from Calc cells
Comment 2 Oliver Brinzing 2020-02-28 17:58:39 UTC
reproducible up to LO 6.1.4.2 as described above
Comment 3 Commit Notification 2020-03-06 20:43:31 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/3269f4fa5477104fbea363937ec84dfab2f914d9

tdf#131000 fix stuck combo box property editor

It will be available in 6.4.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Xisco Faulí 2020-03-07 09:48:13 UTC
Verified in

Version: 7.0.0.0.alpha0+
Build ID: bdfd0feefe3785e1ea68bf1f1f987147c8fe9335
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

@Jan-marek, thanks for fixing this issue!
Comment 5 Xisco Faulí 2020-03-07 09:58:02 UTC
also verified in

Version: 6.4.3.0.0+
Build ID: 2478e861e221b2080309614ca7b29ca6c06af92f
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 6 Commit Notification 2020-03-10 23:57:02 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/ff59cba2922f0f7e1c45e01c3f08616f6771f057

tdf#131000 fix stuck combo box property editor

It will be available in 6.3.6.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2021-02-26 07:59:30 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/df33714f0ecaf4d35011f2d2116e5e1a4ec75f1a

tdf#131000: sc: Add UItest

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.