Bug 73165 - inline spellchecking waits for typing pauses before redlining errors
Summary: inline spellchecking waits for typing pauses before redlining errors
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: Other All
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: BSA target:4.5.0 target:4.4.0.2 targe...
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2013-12-30 20:09 UTC by S.
Modified: 2021-07-14 20:50 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description S. 2013-12-30 20:09:11 UTC
Hello,

I have been using LibreOffice for years on Linux. I have recently noticed that spellchecking has become terribly slow. I am using Libreoffice 4.1.4.2 on Arch Linux on a fast Intel Core I5 laptop, and I've never seen spellchecking this slow. It usually takes at least 1 second after hitting the spacebar after a misspelled word before it shows up with a red underline. Sometimes it takes 5 seconds or more. By this time I have usually typed far beyond that word and don't notice it anymore. This slowness occurs with both English and Spanish spellchecking, and I imagine the other languages are the same. I can also confirm that on Firefox, the built in spellchecking (which I believe uses the same engine?) is instantaneous and reliable. I can't really say when exactly this regression happened, but a few months ago I don't think it was this bad on whatever the current LibO version was at that time.

Thanks for looking into this.
Operating System: Linux (Other)
Version: 4.1.4.2 release
Comment 1 retired 2013-12-31 10:24:20 UTC
Does this issue persist with the latest pre-release 4.2.0.1: http://www.libreoffice.org/download/pre-releases/

Should this be still reproducible for you with the latest LO release please set this bug back to UNCONFIRMED. Should this issue be solved set it to WORKSFORME.

Setting to NEEDINFO until more detail is provided.
Comment 2 Julien Nabet 2013-12-31 11:10:32 UTC
S.: do you reproduce this with brand new files?
If yes, could you rename your LO directory profile (see https://wiki.documentfoundation.org/UserProfile) and give it a new try?
Comment 3 S. 2013-12-31 12:19:00 UTC
@Foss: Thanks, I'll see if I can figure out how to test the prelease. It's rather difficult on Arch Linux.

@Julien: Thanks for looking into this. Yes, I have confirmed that this bug is reproducable with brand new documents. Also, I renamed my user profile, and started a new Writer document, and the first mispelled word took around 5 seconds to be flagged.
Comment 4 S. 2014-01-02 16:49:22 UTC
OK, I tried 4.2.0 RC1, and it behaves exactly the same.

I think I figured out what is going wrong. It seems to be waiting for a pause in typing input before it checks the spelling. I can type a string of gibberish words "ldskjkja lskj ddljsakdjsadj lksajd ask" and none of them will be underlined indefinitely for as long as I keep typing at a normal rate (and I'm not a very fast typer). But when I finally stop typing for something like 500 to 1000 miliseconds, all of the words are suddenly flagged as mispelled.
Comment 5 Julien Nabet 2014-01-22 20:57:01 UTC
S.: thank you for your feedback, I put it back to UNCONFIRMED since you provided the asked information.
Comment 6 retired 2014-03-02 10:04:21 UTC
Please do not adjust the version field. Version is the version the bug first appeared in.l
Comment 7 tommy27 2014-04-15 05:35:08 UTC
(In reply to comment #4)
> OK, I tried 4.2.0 RC1, and it behaves exactly the same.
> 
> I think I figured out what is going wrong. It seems to be waiting for a
> pause in typing input before it checks the spelling. I can type a string of
> gibberish words "ldskjkja lskj ddljsakdjsadj lksajd ask" and none of them
> will be underlined indefinitely for as long as I keep typing at a normal
> rate (and I'm not a very fast typer). But when I finally stop typing for
> something like 500 to 1000 miliseconds, all of the words are suddenly
> flagged as mispelled.

good catch!!! it's exactly related to typing pauses.
this is a different behaviour in 4.1.x in respect to previous versions where error redlining was almost immediate and did not wait typing pauses.

normal spellchecking behaviour till 4.0.6 and regression introduced in 4.1.0 (tested under Win7x64)

modified summary notes and changed version and platform fields
Comment 8 tommy27 2014-04-15 05:36:37 UTC
just to add that issue persists in 4.2.3.3 as well.
Comment 9 Matthew Francis 2014-12-05 06:49:02 UTC
For reference, bibisect and a quick skim through the patches in the identifed range showed the following. Given that this change was by design, and that major work would likely be required to put it back the old way without seriously regressing performance on large (64k+ word) paragraphs, I don't see it's very likely to be changed.


Results from bibisect-43all:
 5b352a8b3b7a2225e56a9143b5c0046f8eeb4a52 is the first bad commit
commit 5b352a8b3b7a2225e56a9143b5c0046f8eeb4a52
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Wed Oct 16 00:17:19 2013 +0000

    source-hash-3c70c8e449253b4219c12ee4ef50384030a474ef
    
    commit 3c70c8e449253b4219c12ee4ef50384030a474ef
    Author:     Caolán McNamara <caolanm@redhat.com>
    AuthorDate: Thu Dec 20 09:18:29 2012 +0000
    Commit:     Caolán McNamara <caolanm@redhat.com>
    CommitDate: Thu Dec 20 16:52:56 2012 +0000
    
        implement small-size variant stock image buttons
    
        Change-Id: I82d5a957b5c38b8aa19e28ceb8d6850c0bf7526e

# bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
# good: [a71a4447320f177181c9cff9f7c6fd93802cbd8e] source-hash-9afb6e1e38c362a768e8e981f7b03cf8bcaf22cf
git bisect start 'latest' 'last36onmaster'
# bad: [f2554751603ad8537257b3cf52d6171056c76eeb] source-hash-f42768fe0b60ecbbe9c68d775329bf28c0690131
git bisect bad f2554751603ad8537257b3cf52d6171056c76eeb
# bad: [c826604de689fbabd8b1b8ea41396694e99a23d4] source-hash-32acb98b3fb6acb4712f7195cf5ea1bd69c9c6b4
git bisect bad c826604de689fbabd8b1b8ea41396694e99a23d4
# good: [bb53f5537f5dd98997a2148f6a8eafb10d449831] source-hash-93effcb0a2eade8309c53b74d0ea22e8a2217661
git bisect good bb53f5537f5dd98997a2148f6a8eafb10d449831
# good: [7fa43e1a1b181ccdcb395c16788a66c591b63045] source-hash-41c2b0375773b2d2945d75e255ea6bb6c7fd378d
git bisect good 7fa43e1a1b181ccdcb395c16788a66c591b63045
# bad: [5b352a8b3b7a2225e56a9143b5c0046f8eeb4a52] source-hash-3c70c8e449253b4219c12ee4ef50384030a474ef
git bisect bad 5b352a8b3b7a2225e56a9143b5c0046f8eeb4a52
# good: [feb021119814d5b098a8a2bbfb60d382956edab2] source-hash-9d7c1dcbbbce69bebec54d85004a0da5074775cd
git bisect good feb021119814d5b098a8a2bbfb60d382956edab2
# good: [366ddd523d5f458b9d5c357934a8fa931e9f2d62] source-hash-32ca77577f781010aa4549016adaebff1a5a3624
git bisect good 366ddd523d5f458b9d5c357934a8fa931e9f2d62
# good: [65831911b71b1982c9c2c759fd80b8e9404e9641] source-hash-3a9e1e71d9a28b2c6bc96757e629b231d2276d9d
git bisect good 65831911b71b1982c9c2c759fd80b8e9404e9641
# good: [251dbe932a666e83c91816fcf755a4c3be51e078] source-hash-fff4d120866a0be3cd8185f2c67bb9f59b1a6a3f
git bisect good 251dbe932a666e83c91816fcf755a4c3be51e078
# first bad commit: [5b352a8b3b7a2225e56a9143b5c0046f8eeb4a52] source-hash-3c70c8e449253b4219c12ee4ef50384030a474ef


Probably this commit:

commit 7a5272dc29c6efdaa99f97a627e6d9b695ae32f6
Author: pkoroau pkoroau <pkoroau@gmail.com>
Date:   Thu Dec 20 12:18:57 2012 +0100

    fdo#38837: Timers must end eventually [Writer idle timer]
    
    Change-Id: I36c6c56d7277b9b3853b846c86c1f4dd47ebdb08
    Signed-off-by: Luboš Luňák <l.lunak@suse.cz>
Comment 10 tommy27 2014-12-05 12:26:06 UTC
Ok, this could be a candidate to WONTFIX status.
Comment 11 S. 2014-12-05 13:09:44 UTC
(In reply to tommy27 from comment #10)
> Ok, this could be a candidate to WONTFIX status.

This is extremely disappointing. :( It kind of negates the whole point of inline spellchecking-- to catch errors as they are typed. As it is currently, it would be just as effective to turn off inline spellchecking and hit the "Check Spelling" button to review the errors one by one in a dialog.
Comment 12 tommy27 2014-12-05 13:33:48 UTC
let's hear what developers think about. (adding Bjorn and Caolna on CC list) 

if that change was made by design it's probably a tradeoff to obtain something else, or maybe it can be reverted with no loss of other functions... only a dev can answer to this
Comment 13 Björn Michaelsen 2015-01-02 22:30:54 UTC
Removing Caolan and me -- neither of us did the relevant commit. As noted in comment 9, this commit:

 https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=7a5272dc29c6efdaa99f97a627e6d9b695ae32f6;hp=4241ef2325d803914e9c29d8d6ec0e7c49f6996c

by pkoroau pkoroau <pkoroau@gmail.com> (reviewed by Luboš Luňák <l.lunak@suse.cz>) likely was the relevant change. Note that Writer had timeouts before, so there was a delay before (but it might have been shorter: this might need to be investigated.

Adding fdo#38837 to see also for context.
Comment 14 Commit Notification 2015-01-07 13:15:28 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fd0577e6b65cfd948b2fbe16fa1bd06fe0c635b9

Resolves: fdo#73165 don't restart timer if already running

It will be available in 4.5.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.
Comment 15 Caolán McNamara 2015-01-07 13:20:12 UTC
fixed in master, backports for 4-4 and 4-3 in gerrit
Comment 16 Commit Notification 2015-01-07 13:45:31 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5a93387b70e563fe1b5191d20524dd1d0dfec11b&h=libreoffice-4-4

Resolves: fdo#73165 don't restart timer if already running

It will be available in 4.4.0.2.

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.
Comment 17 Commit Notification 2015-01-07 16:48:23 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0823a95da37cc0cf9d0490a3a3c6c0e0e0d0e11e&h=libreoffice-4-3

Resolves: fdo#73165 don't restart timer if already running

It will be available in 4.3.6.

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.
Comment 18 Robinson Tryon (qubit) 2015-12-17 07:35:00 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]