Steps to reproduce: 1. Open attachment 106004 [details] from bug 83684 2. Press F11 to open 'styles and formatting' menu Observed behavior: Libreoffice freezes. Reproduced with Version: 5.0.1.2 Build ID: 81898c9f5c0d43f3473ba111d7b351050be20261 Locale: es-ES (es_ES) on Windows 7 (64-bit)
I reproduce the bug under Win8.1 x64 using LibO 4.4.0.3 and a recent LibO 5.1.0 alpha daily build. file can't be opened in LibO 4.3.x because of bug 83684
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (5.1.5 or 5.2.1 https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug-20160920
This issue is still reproducible in Version: 5.3.0.0.alpha0+ Build ID: 8974b0fafb18f9dd3f2c0e175a3255b80e4c249e CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; Locale: ca-ES (ca_ES.UTF-8); Calc: group
Created attachment 128273 [details] .xls sample Same result in .XLS
(In reply to Xisco Faulí from comment #4) > Created attachment 128273 [details] > .xls sample > > Same result in .XLS Apparently the file contains 32572 styles, and this function is quadratic because of the two nested for-loops: StyleTreeArr_Impl& MakeTree_Impl(StyleTreeArr_Impl& rArr) http://opengrok.libreoffice.org/xref/core/sfx2/source/dialog/templdlg.cxx#555
Three nested for-loops, actually...
Probably the array can be replaced by a std::map instead?
Yes, I thought of something similar, I'm using a helper unordered_map with style name and pointer to style. That gets rid of the second-level for-loop (linear -> const access). The innermost for-loop is being replaced with an std::lower_bound, since it always tries to insert in a sorted array (linear -> log access).
Aron Budea committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=2cee32bd4f90cc70a44755f9a8e4a6e9c6c6f2d9 tdf#94262: fix performance of MakeTree_Impl(...) in templdlg.cxx It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
fix verified in Version: 5.3.0.0.alpha1+ Build ID: 757a60d01dd152aadab2ba3c8224252481ce8a88 CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk2; Layout Engine: new; Locale: ca-ES (ca_ES.UTF-8); Calc: group @Aron, you can close it as RESOLVED VERIFIED
Great, thanks for the verification.
Note: I tried cherry-picking it into 5.2, but that gave a merge conflict. Not sure how to proceed, so I'm not doing anything about it now, but if having this fix in 5.2 would be important, I can look into it.