[1.7.2] Lag when typing letters and words

Ju
Jura
Posts: 56
Joined: Wed Mar 07, 2012 4:12 pm
Platform: Windows

Sun Jul 13, 2014 4:50 am Post

Using Scrivener 1.7.2.0 with Windows 7 SP1, I have the issue that there is a severe lag between typing and the words appearing. Depending on how fast one types, it takes around 2-3 seconds before the word appears.

scr.13-07-2014 06.30.38.png
scr.13-07-2014 06.30.38.png (45.3 KiB) Viewed 3074 times


Other points:
  • This did not happen prior to 1.7.2.
  • My "Windows performance index" is a good 6,7.
  • The CPU is a AMD A5-5600k which is certainly quick enough for typing.
  • Perhaps this is related to the spell checking issue I reported here? I base this idea on the observation that the CPU spikes are most heavy after pressing space when completing a words (when I assume the dictionary is referenced). In case it's relevant, I use the English (United Kingdom) dictionary.
  • The bug is especially pronounced when typing in a table; the lag is less when typing normal text (but still there).
  • Turning off the spell check feature does not stop the lag (at least not when the bug has already occurred); only after closing and restarting Scrivener the problem goes away temporarily.
  • This problem occurs when typing in a single-document view, but might also happen with two-document view (I don't use that latter feature less).
  • I could not find a specific cause of this bug; it happens infrequently (about once per 1-2 days).

If you need more information, let me know. Oh, and please respond. :)

User avatar
MimeticMouton
Posts: 8711
Joined: Wed May 05, 2010 5:39 am
Platform: Mac + Windows
Location: city of rain
Contact:

Sun Jul 13, 2014 9:13 pm Post

Is the lag something that just starts out of the blue while you're working and then occurs until you close and restart Scrivener? Or does it just start and stop throughout a single session?

I'd try running Scrivener in Safe Mode or after a reboot with all your start up items temporarily disabled (via msconfig), to help eliminate conflicts with other software.

What is your text formatting like in the editor? Do you use justified alignment? Do you have invisibles showing?

Is there any difference with the size of the text document, e.g. does the lag occur in long documents but not when typing in shorter ones?

Regarding disabling the spell check, do you mean that if it is disabled when Scrivener starts, then the lag does not happen, but if it is enabled and the bug then occurs, disabling it does not fix the lag? Or will the lag start even if "Check spelling as you type" and "Correct spelling errors as you type" are both disabled from the time Scrivener opens?
Jennifer Hughes
(MM for short)

Ju
Jura
Posts: 56
Joined: Wed Mar 07, 2012 4:12 pm
Platform: Windows

Thu Jul 17, 2014 4:11 am Post

MimeticMouton wrote:Is the lag something that just starts out of the blue while you're working and then occurs until you close and restart Scrivener? Or does it just start and stop throughout a single session?

It starts seemingly randomly, and to stop it I need to restart scrivener.

MimeticMouton wrote:I'd try running Scrivener in Safe Mode or after a reboot with all your start up items temporarily disabled (via msconfig), to help eliminate conflicts with other software.

Running Scrivener in Safe Mode is a good idea. Disabling other software is not practical since this Scrivener problem only occurs every few days.

MimeticMouton wrote:What is your text formatting like in the editor? Do you use justified alignment? Do you have invisibles showing?

scr.17-07-2014 06.06.15.png
scr.17-07-2014 06.06.15.png (4.15 KiB) Viewed 3017 times

Don't know what invisibles are, so probably don't have them enabled. :)

MimeticMouton wrote:Is there any difference with the size of the text document, e.g. does the lag occur in long documents but not when typing in shorter ones?

Don't know; each of my documents have more or less the same length (+/- < 1100 words).

MimeticMouton wrote:Regarding disabling the spell check, do you mean that if it is disabled when Scrivener starts, then the lag does not happen, but if it is enabled and the bug then occurs, disabling it does not fix the lag? Or will the lag start even if "Check spelling as you type" and "Correct spelling errors as you type" are both disabled from the time Scrivener opens?

If the lag happens, and the lag occurs, disabling the spell check does not help. Only closing and starting again helps. "Correct spelling errors as you type" is something I've always disabled.

Ju
Jura
Posts: 56
Joined: Wed Mar 07, 2012 4:12 pm
Platform: Windows

Sat Jul 26, 2014 5:14 am Post

As an update, last week it happened once. During that time, I was typing in a table with a single document view. The lag persisted when I afterwards typed outside the table, but was less severe than typing in the table.

The table had 2 columns and 6 rows, and the document was just under 300 words long, so document length can probably ruled out as a contributing factor.

User avatar
MimeticMouton
Posts: 8711
Joined: Wed May 05, 2010 5:39 am
Platform: Mac + Windows
Location: city of rain
Contact:

Sat Jul 26, 2014 5:51 am Post

Thanks for the update. I have seen and reproduced some significant typing lag using specific input languages like Thai, also unrelated to document length, but not the severe problem you're seeing with English. You mentioned the tables before--do you find that the lag *starts* when you're in the table and then continues afterward, or do you ever get lag in a document without a table, before you've worked in a table at all?
Jennifer Hughes
(MM for short)

Ju
Jura
Posts: 56
Joined: Wed Mar 07, 2012 4:12 pm
Platform: Windows

Sat Aug 09, 2014 4:36 am Post

MimeticMouton wrote:You mentioned the tables before--do you find that the lag *starts* when you're in the table and then continues afterward, or do you ever get lag in a document without a table, before you've worked in a table at all?

The lag starts when working in a table. Once it starts, it does continue when writing outside the table, but very minor: that lag would probably be 15% of the lag occurring in the table. So it is much more pronounced in the table.

In a document without a table, I do not get a lag. And if a document has a table, but I did not work in it during the current Scrivener session, there is no lag.

If it's helpful, here's a screenshot of the Scrivener.exe's threads when the lag occurs:

scr.09-08-2014 06.27.01.png
scr.09-08-2014 06.27.01.png (41.36 KiB) Viewed 2925 times


And here is where the lag the last time occurred:

scr.09-08-2014 06.32.51.png
scr.09-08-2014 06.32.51.png (86.27 KiB) Viewed 2925 times

Ju
Jura
Posts: 56
Joined: Wed Mar 07, 2012 4:12 pm
Platform: Windows

Wed Sep 10, 2014 8:44 am Post

Any update on this? As a workaround I always try to work without tables and use Tab to format a table like structure (not productive at all), but today I had to use a table to keep working in Scrivener convenient. And the error immediately reappeared, in the second row of the table.

As was suggested in the screenshot above, it might be related to the resizing of the table in Scrivener. I'll need to test it further, but it seems that when the total table width is less than 100%, the bug does not occur.

Ju
Jura
Posts: 56
Joined: Wed Mar 07, 2012 4:12 pm
Platform: Windows

Sat Sep 13, 2014 9:00 am Post

Jura wrote:As was suggested in the screenshot above, it might be related to the resizing of the table in Scrivener. I'll need to test it further, but it seems that when the total table width is less than 100%, the bug does not occur.

Nope, this workaround does not work. When adding a new row to a table less than 100% wide, the bug still occurs. Might therefore still something that is related to the table size/layout.

User avatar
MimeticMouton
Posts: 8711
Joined: Wed May 05, 2010 5:39 am
Platform: Mac + Windows
Location: city of rain
Contact:

Sun Sep 14, 2014 8:49 am Post

Thanks for the update and trying the different table widths, even though unfortunately that didn't cut it. I haven't found any other workaround to suggest, I'm afraid. You could try increasing the auto-save interval, but it didn't seem to make any difference in my testing. I've only been able to reproduce this is very large documents, however, so it could be worth a try. One other question, are you seeing this in tables that you created directly in Scrivener, or are these tables copied or imported from another program?

We're currently working on some major under-the-hood updates for the next major version, which will impact tables, lists and a lot else. It may be these changes alone will clear up the lag problem, but even if not we'll be in a better place to address the problem.
Jennifer Hughes
(MM for short)

Ju
Jura
Posts: 56
Joined: Wed Mar 07, 2012 4:12 pm
Platform: Windows

Fri Sep 19, 2014 5:14 am Post

MimeticMouton wrote:I've only been able to reproduce this is very large documents, however, so it could be worth a try.

It does not happen for me in very large documents (although that depends on what large is). My recent document in which it occurred was 1.987 words and 12.298 characters. The Scrivener project file is, however, somewhat large (87k words, 566k characters).

MimeticMouton wrote:One other question, are you seeing this in tables that you created directly in Scrivener, or are these tables copied or imported from another program?

I create the tables directly in Scrivener with 'Insert Table'. All content that is pasted in Scrivener is in the document itself (so no 'Research' entries) and pasted as without formatting ('paste and match style' option).

MimeticMouton wrote:We're currently working on some major under-the-hood updates for the next major version, which will impact tables, lists and a lot else. It may be these changes alone will clear up the lag problem, but even if not we'll be in a better place to address the problem.

That's good news!

Ju
Jura
Posts: 56
Joined: Wed Mar 07, 2012 4:12 pm
Platform: Windows

Thu Apr 02, 2015 9:13 am Post

Any update on this? It still happens with Scrivener 1.8.5.0.

Sa
SavingPrincess
Posts: 7
Joined: Mon Apr 06, 2015 5:28 pm
Platform: Windows

Wed Apr 08, 2015 8:03 pm Post

I was able to get rid of this by changing the "save after period of inactivity" setting.

It defaults to "2 seconds," which means that every two seconds you don't touch something, it starts the save process. This will introduce a "lag" feeling, because it's actually saving the project. Set it to 30 seconds or something reasonable and it should go away.

User avatar
MimeticMouton
Posts: 8711
Joined: Wed May 05, 2010 5:39 am
Platform: Mac + Windows
Location: city of rain
Contact:

Wed Apr 08, 2015 11:18 pm Post

Jura wrote:Any update on this? It still happens with Scrivener 1.8.5.0.

I'm afraid there's nothing new to report. We haven't gotten any additional reports that could shed light on the problem, nor have we been able to reproduce the issue or root out the cause. Since we are updating the framework for the next major, I'm still hopeful that will clear up this problem, but I know that does not help you in the immediate case. Did you ever try testing in Safe Mode to see if it made a difference?
Jennifer Hughes
(MM for short)

Ju
Jura
Posts: 56
Joined: Wed Mar 07, 2012 4:12 pm
Platform: Windows

Fri Apr 10, 2015 9:16 am Post

SavingPrincess wrote:I was able to get rid of this by changing the "save after period of inactivity" setting.

It defaults to "2 seconds," which means that every two seconds you don't touch something, it starts the save process. This will introduce a "lag" feeling, because it's actually saving the project. Set it to 30 seconds or something reasonable and it should go away.

MimeticMouton wrote:Did you ever try testing in Safe Mode to see if it made a difference?

Thanks for the suggestions! Will try these to see how it goes.

gl
glaedr
Posts: 101
Joined: Tue Nov 08, 2011 7:35 pm
Platform: Linux + Windows

Wed Jun 24, 2015 11:21 am Post

I've just started experiencing this bug for the first time today. Adjusting autosave did not correct it and it's not a file size issue for me, it's a completely new document with only a few lines in it. Script mode with the US stage play template has it, regular blank template still seems fine. I'm currently typing into a table, where it's worst. Typing below it still has a delay, but not so pronounced. Is the text perhaps having to be filtered through something when a template or table is used? Please prioritize this. It makes the template completely unusable. It's taken me well over an hour, even pasting from notepad, to create something that should have taken 10-15 minutes at most.