Bug 94184 - Automatic spell checking makes Writer unresponsive for ~2min
Summary: Automatic spell checking makes Writer unresponsive for ~2min
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, perf, regression
: 113137 (view as bug list)
Depends on:
Blocks: Spell-Checking VCL-Scheduler
  Show dependency treegraph
 
Reported: 2015-09-13 11:23 UTC by Remi
Modified: 2018-12-05 13:13 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
slow document (45.77 KB, application/vnd.oasis.opendocument.text)
2015-09-13 11:23 UTC, Remi
Details
Bibisect log (2.44 KB, text/plain)
2017-10-04 15:33 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Remi 2015-09-13 11:23:14 UTC
Created attachment 118663 [details]
slow document

I have a document with 65 labels on a page (see attachment). It already has too many images that are pretty large and that make it hard to work with in Writer. There is not a lot of text, which is why I find it strange that automatic spell checking blocks Writer for 2-3min.

Steps to reproduce:
1) Open document with automatic spell checking enabled
2) Wait and see how spell checking adds wiggly lines to words in a frequency of around 1 per second while making Writer completely unresponsive.

Less extreme but still visible:
Steps to reproduce:
1) Disable automatic spell checking
2) Open document (it is slow but usable)
3) Enable automatic spell checking -> Writer is unresponsive for 1 minute while it checks for spelling mistakes

The PC this runs on is rather old but handles the document before and after spell checking, but is completely overloaded while spell checking is in progress. I actually think the reason is more in rendering the wiggly lines that may trigger re-rendering of the whole view(?). Still, the performance in this case requires me to disable spell checking completely, which I think should never be necessary. Re-rendering every ~10s instead of every word may be the better approach if rendering is the actual cause.
Comment 1 Buovjaga 2015-09-18 16:20:01 UTC
Repro.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+ (x64)
Build ID: 9ce08dcc2e32c5554ddf71b79173f8854e0568ad
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-09-17_21:43:51
Locale: en-US (fi_FI)
Comment 2 Robinson Tryon (qubit) 2015-12-09 18:08:20 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2017-01-03 19:43:01 UTC Comment hidden (obsolete)
Comment 4 Telesto 2017-06-14 20:53:28 UTC
Repro with
Version: 5.5.0.0.alpha0+
Build ID: 076ed447f694239d5c67adee528ea6e471d909ff
CPU threads: 4; OS: Windows 6.19; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-06-09_23:54:20
Locale: nl-NL (nl_NL); Calc: CL

but not in the same extend in
Versie: 4.4.6.3 
Build ID: e8938fd3328e95dcf59dd64e7facd2c7d67c704d
Locale: nl_NL
Comment 5 Telesto 2017-06-14 21:27:59 UTC Comment hidden (obsolete)
Comment 6 Telesto 2017-10-04 15:33:17 UTC
Created attachment 136760 [details]
Bibisect log

~/bibisect-win32-5.1
$ git bisect bad 38ec2e0798e9d97f7c6bf23dc0cf8e3c9042c10b is the first bad commit
commit 38ec2e0798e9d97f7c6bf23dc0cf8e3c9042c10b
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Fri Jul 17 08:11:27 2015 -0700

    source 48c2815dd20cf20eeec8bb4e003000f4a3d13291

    source 48c2815dd20cf20eeec8bb4e003000f4a3d13291

:040000 040000 5229b95dd215b7bf6ba2c768943b9566007896b7 bb58c68d019654097b1257a8d1d4318864d20b6e M      instdir

--
author	Michael Meeks <michael.meeks@collabora.com>	2015-06-10 11:08:00 (GMT)
committer	Michael Meeks <michael.meeks@collabora.com>	2015-06-10 16:27:20 (GMT)
commit 48c2815dd20cf20eeec8bb4e003000f4a3d13291 (patch)
tree 19596543beea4e4f56d1d06f429e575f596f0ad7
parent ef4fd9c52f16e6d242f999dd87170e6cac07230d (diff)
tdf#91727 - Unwind non-dispatch of idle handlers.
This clobbers the functionality from commit:

    06d731428ef6cf93c7333e8228bfb6088853b52f

    make idle timers actually activate only when idle

Since now all rendering and re-sizing is done in idle handlers it
does effectively the opposite of what was intended. A better solution
would allow special-casing the processing of just rendering,
re-sizing and window management to spin for eg. progress bar
rendering.

Also add helpful debugging labels to the idle & timeouts.

Also cleanup the Idle vs. Scheduler handling.

Also ensure that starting an Idle triggers a mainloop wakeup.

Also add a unit test.
Comment 7 Telesto 2017-10-04 15:36:37 UTC Comment hidden (obsolete)
Comment 8 Telesto 2017-10-04 15:50:49 UTC
Repro with:
Version: 6.0.0.0.alpha0+
Build ID: b087e451527f2e497ccab83b63b4f10099bfb8b8
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-10-03_23:43:39
Locale: nl-NL (nl_NL); Calc: CL
Comment 9 Xisco Faulí 2017-10-06 21:38:15 UTC
Adding Cc: to Michael Meeks
Comment 10 Xisco Faulí 2017-10-15 21:20:42 UTC
*** Bug 113137 has been marked as a duplicate of this bug. ***
Comment 11 Telesto 2018-02-18 11:36:19 UTC
No repro with
Version: 6.1.0.0.alpha0+
Build ID: b87fe45e8b087a315a65b92bf9c168b1e4c5cc00
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-02-16_23:14:35
Locale: nl-NL (nl_NL); Calc: CL
Comment 12 Buovjaga 2018-02-19 16:27:26 UTC
(In reply to Telesto from comment #11)
> No repro with
> Version: 6.1.0.0.alpha0+
> Build ID: b87fe45e8b087a315a65b92bf9c168b1e4c5cc00
> CPU threads: 4; OS: Windows 6.3; UI render: default; 
> TinderBox: Win-x86@42, Branch:master, Time: 2018-02-16_23:14:35
> Locale: nl-NL (nl_NL); Calc: CL

Yep, with Swiss German dictionary installed, it is not unresponsive

Version: 6.0.1.1 (x64)
Build ID: 60bfb1526849283ce2491346ed2aa51c465abfe6
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: fi-FI (fi_FI); Calc: group