Description: The right click menu containing spellcheck suggestions is opening quite slow Steps to Reproduce: 1.Open a Writer document 2.Type a misspelled word. Like "Hollo" 3. Right click it, for the spelling suggestions Actual Results: There is quite a delay before the menu opens compared to LibO5.0.0.5 Expected Results: Should open instantly like in LibO5.0.0.5 Reproducible: Always User Profile Reset: No Additional Info: Found in Version: 5.4.0.0.alpha0+ Build ID: 99eed82939999d9a9689788a4134dd05d5c20c5a CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; TinderBox: Win-x86@42, Branch:master, Time: 2017-01-14_23:37:40 Locale: nl-NL (nl_NL); Calc: CL and in Version: 5.2.0.4 but not in Version: 5.0.0.5 Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b Locale: en-US (nl_NL) User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Setting to new: [19:04] <bearon> Telesto: you're right, it's noticeably slower now
Using bibisect-win32-5.2. Interestingly, it seems to be getting slower in two steps, for now I bibisected the earlier one, it splits when getting to this step: [1540320dd5f15974767df02970e9f3338042069f] source 3a09d852db28245633d06d0c79744a7780b19f1a a58213cbd28d5901ff6ef5f2dab4e0fbf8f3bdba is the first bad commit commit a58213cbd28d5901ff6ef5f2dab4e0fbf8f3bdba Author: Norbert Thiebaud <nthiebaud@gmail.com> Date: Sun Apr 10 02:14:44 2016 -0700 source ce9e8630b4df2f515bd77d77b3450890b87de30a # bad: [c1d414d7a844a3f5e10a7ad9519ebfaa1b402f01] source ceaa06bc7153387238eead0a69d874ed35241793 # good: [1f670510f08cb800cbae2a1dd6ea70d3542e4721] source 49c2b9808df8a6b197dec666dfc0cda6321a4306 git bisect start 'c1d414d7a844a3f5e10a7ad9519ebfaa1b402f01' 'oldest' # good: [216f950cc4d65afde1875a4af94dcfa03b7c122e] source 8bcc538953ceec4ef266f16cf72329bc6080d08c git bisect good 216f950cc4d65afde1875a4af94dcfa03b7c122e # good: [5fdb6135ef45a8eb6d5f5987e64be0fdb9a3aac8] source 2d74cbe769e4562d6edcd0d35868fa80e6d9dd15 git bisect good 5fdb6135ef45a8eb6d5f5987e64be0fdb9a3aac8 # bad: [3cea24fca526198de568112905dc5a8c199b97c0] source 600c2ca58bf7c2a38d4a41a80bdc1ad8373a9ff0 git bisect bad 3cea24fca526198de568112905dc5a8c199b97c0 # bad: [1540320dd5f15974767df02970e9f3338042069f] source 3a09d852db28245633d06d0c79744a7780b19f1a git bisect bad 1540320dd5f15974767df02970e9f3338042069f # good: [29ac04b4258eeb522c41e11cc4c070cce287666c] source 45f683a495411af8e059527c137af335ade79c37 git bisect good 29ac04b4258eeb522c41e11cc4c070cce287666c # bad: [ed9c4fe7ccd6f0fc7474ec0302add68d63f64798] source 234f10eb26b70bb2ab412dd46d2763f3a7f555ff git bisect bad ed9c4fe7ccd6f0fc7474ec0302add68d63f64798 # bad: [6ebf92b1ce25f46661083740d79c9293cb14a633] source e943da4189e829c7b65b6d171bd6d16ca5e0b425 git bisect bad 6ebf92b1ce25f46661083740d79c9293cb14a633 # bad: [d936906cac62c3fe0c505119cbc2565473f12a01] source 71aa80300c89c726254049f775d1c48518b6dfe4 git bisect bad d936906cac62c3fe0c505119cbc2565473f12a01 # bad: [2fe7aaf141d3b45a13337f784e3a2fe9ce248ab1] source 9c38c84c4840f5c4129494f713e89a7d82cb79e4 git bisect bad 2fe7aaf141d3b45a13337f784e3a2fe9ce248ab1 # good: [adf2dae2e35117002ba701271d91a264ed0b723f] source 6a37ea928d2c0ef9dd7fd7031b3e4e6341a162e2 git bisect good adf2dae2e35117002ba701271d91a264ed0b723f # good: [7e0abcb77f2af07380169ef8edfbce133a025667] source 2105f5b4403fcda7cdadbd108d6578ca759af219 git bisect good 7e0abcb77f2af07380169ef8edfbce133a025667 # bad: [056d227560d619414ad84f18fa222e72fbca09e5] source 157469896ef56720f33676222b95e81c04ab5c72 git bisect bad 056d227560d619414ad84f18fa222e72fbca09e5 # bad: [a58213cbd28d5901ff6ef5f2dab4e0fbf8f3bdba] source ce9e8630b4df2f515bd77d77b3450890b87de30a git bisect bad a58213cbd28d5901ff6ef5f2dab4e0fbf8f3bdba # first bad commit: [a58213cbd28d5901ff6ef5f2dab4e0fbf8f3bdba] source ce9e8630b4df2f515bd77d77b3450890b87de30a
So this got slower in two steps (seemingly, I've yet to bibisect the second one). This is the first one, hunspell update to 1.3.4: https://cgit.freedesktop.org/libreoffice/core/commit/?id=ce9e8630b4df2f515bd77d77b3450890b87de30a "bump hunspell to 1.3.4"
Current hunspell version in LibreOffice is 1.5.4 and the latest hunspell version is 1.6.0 which fixes some performance problems. Perhaps, upgrading to 1.6.0 fixes this problem... @Caolan, any thought on this?
d2e19f851cbbaf05cf39a651c3b645b82ac975ca is the first bad commit commit d2e19f851cbbaf05cf39a651c3b645b82ac975ca Author: Norbert Thiebaud <nthiebaud@gmail.com> Date: Sat Apr 23 02:17:34 2016 -0700 source 1098921996c81a4d6dc917bbc16d5f834ebf6728 # bad: [c1d414d7a844a3f5e10a7ad9519ebfaa1b402f01] source ceaa06bc7153387238eead0a69d874ed35241793 # good: [1540320dd5f15974767df02970e9f3338042069f] source 3a09d852db28245633d06d0c79744a7780b19f1a git bisect start 'c1d414d7a844a3f5e10a7ad9519ebfaa1b402f01' '1540320dd5f15974767df02970e9f3338042069f' # bad: [848590900633c602c307eabaa13bf98d5be79932] source 376c337d46acf8819bf032251bfc7d5eb31db198 git bisect bad 848590900633c602c307eabaa13bf98d5be79932 # bad: [68bb5e2e704bcf40d4886f523a81957e4e18ef87] source b24cc067695d7986f231303218e7b853d827b316 git bisect bad 68bb5e2e704bcf40d4886f523a81957e4e18ef87 # good: [efe2f539e2cf53613435ca6e49c2146f377a92fb] source 577fbba417454da8cd461da71fee8b97896d2497 git bisect good efe2f539e2cf53613435ca6e49c2146f377a92fb # bad: [95bd680b85109da1d4e9ad76213a27220c2c9fa4] source 0154776f2d0bc13e44411e67f6b02bd5032b18a0 git bisect bad 95bd680b85109da1d4e9ad76213a27220c2c9fa4 # bad: [4d0c764b0d3b3e6af20fc737dd75b0b7bf9b307f] source 555c9add26e06030402c73f885de98f4b96826f0 git bisect bad 4d0c764b0d3b3e6af20fc737dd75b0b7bf9b307f # good: [69eaf9f321844b0a0a7a1c8870a284690c020fd4] source 766280b8ebbb61d4c06828322575911839adb7ce git bisect good 69eaf9f321844b0a0a7a1c8870a284690c020fd4 # good: [6d587a996a619e721c643c8fbc6591a0cc099522] source 43faf91ee36646af5c13cfc5af649c3ff2f3297b git bisect good 6d587a996a619e721c643c8fbc6591a0cc099522 # good: [4269c9ba5cb439fdeff5e1aa8f74910f972a9ce6] source 2e6a05d6da0ae33a456b1ca40677df56611e779c git bisect good 4269c9ba5cb439fdeff5e1aa8f74910f972a9ce6 # bad: [a0ec67382970a20072ad3293e5efb1ead9e7d5b6] source 304f50684d3ac08e973fd27e6acf3e821394d164 git bisect bad a0ec67382970a20072ad3293e5efb1ead9e7d5b6 # bad: [d2e19f851cbbaf05cf39a651c3b645b82ac975ca] source 1098921996c81a4d6dc917bbc16d5f834ebf6728 git bisect bad d2e19f851cbbaf05cf39a651c3b645b82ac975ca # good: [f92fe348f4984da5de1f3a358f095cd4f668733a] source 1ee570a4e625719f8bf270d372926c0d829ae6f0 git bisect good f92fe348f4984da5de1f3a358f095cd4f668733a # first bad commit: [d2e19f851cbbaf05cf39a651c3b645b82ac975ca] source 1098921996c81a4d6dc917bbc16d5f834ebf6728
Sure enough, this is the source of the second slowdown: https://cgit.freedesktop.org/libreoffice/core/commit/?id=1098921996c81a4d6dc917bbc16d5f834ebf6728 "test pre 1.4.0 hunspell"
Seems a known issue: https://github.com/hunspell/hunspell/issues/406
I've added a few more things to upstream hunspell which give us better cachegrind figures as well, so just need to integrate the latest hunspell to see if that makes a difference
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f0b38738d82dbbc11e9507ee79339cb6563efaa1 Related: tdf#105426 upgrade to hunspell-1.6.0 It will be available in 5.4.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.
Quite some progress, its workable now. With LibO 5.3.0.2 I notice a delay of 3-4 seconds with CPU spikes of 25%. Now it's acceptable with 1-2 sec delay(a accompanied with CPU spikes 10-12%). However not like LibO5.0.0.5 (instantly opening with 1-2% CPU) Version: 5.4.0.0.alpha0+ Build ID: 2670ca3fc597decae78499d1397539668eb84e5e CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; TinderBox: Win-x86@42, Branch:master, Time: 2017-01-31_05:32:46 Locale: nl-NL (nl_NL); Calc: CL
(In reply to Telesto from comment #10) > However not like LibO5.0.0.5 (instantly opening with 1-2% CPU) Well, if I read the report on the hunspell site correctly, they can't/won't fix it right now. It would take a lot of time (too much) to rewrite. Maybe it's getting better with hunspell v2. So hope for the best.
to be sure here, the language for spell checking is Dutch right ?
*cough*, we're building hunspell unoptimized in the release builds, hence the main part of the problem
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=804287e4ab0ae0e9f5d61446b473c9cd985e9674 Resolves: tdf#105426 helpful to actually let the compiler optimize hunspell It will be available in 5.4.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.
While there are some performance drops in hunspell itself from 1.3.3 to < 1.6.0, the major issue is we lost passing compiler optimization flags to hunspell. Testing 1.3.3 against 1.6.0 with optimization flags restored I get 230ms (1.3.3) vs 215ms (1.6.0) for attempting to fetch suggestions of Holloasdasdasdasd with nl_NL dictionary as opposed to > 1100ms with 1.6.0 without the optimization flags. backport to 5-3 in gerrit
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-5-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=53b186d85894c2c41afc025bda459db5cc6ef452&h=libreoffice-5-3 Resolves: tdf#105426 upgrade to hunspell-1.6.0 It will be available in 5.3.1. 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.
*** Bug 106173 has been marked as a duplicate of this bug. ***
*** Bug 101987 has been marked as a duplicate of this bug. ***