Does doing this make your Scrivener lag?[ADDRESSED]

Mi
Mirrorscape
Posts: 17
Joined: Wed Oct 27, 2010 4:35 pm
Platform: Windows

Wed Oct 27, 2010 4:48 pm Post

I've tried to isolate when lag appears for me. I have not kept detailed testing notes but basically this is how it went:

Create new project
Try typing in the first scene (I am using the short story template for these tests) - No lag shows up
Add lots of text to the scene and then try typing again - No lag
Create several new scenes and try to type in one of these scenes - No lag
Add lots of text to several documents then try to type again. - No lag.
Go into corkboard mode and add descriptions and status to the different documents, then return to a scene and try to type - Lag!!


Restart with new project.
Try typing in the first scene - No lag.
Enter corkboard mode and add label and description to the first scene. - No lag.
Add lots of documents to the project and try to type again. - Lag.


I have to shut off my netbook and go home soon so I cannot test further right now, but it seems that it is some sort of combination between having many documents and adding information in corkboard mode (I have not yet tested if I get the same result if I add the information through the inspector instead of the corkboard so it might be nothing to do with corkboard and just be a result of having assigned attributes like status, label, description etc.. to several documents).


/Johannes

Ps
Psychomacologist2.0
Posts: 26
Joined: Tue Oct 26, 2010 4:28 pm
Platform: Windows

Wed Oct 27, 2010 5:37 pm Post

Laxaria wrote:
I just downloaded the update with the bug fixes... and the lag is gone!! After all my testing...... However, this might indicate that the problem was to do with the dictionary? Since that was one thing that was fixed in the update file.


But doing my procedures I noted makes me lag still... Hmmm...

Ok, so I went back when I had more time and repeated the whole procedure from start to finish (see my previous post) and yes... I got the same lag. So I'm guessing when I installed the update, I restarted Scrivener, and perhaps that cured the lag problem and made it look like it went away when it didn't.

I got the same pattern of lag as before, and can confirm a few more details:
1. At point (14) above, where I noted a slight lag especially when backspacing and rewriting over mistakes, I noticed this time that there is actual lag in the backspacing. So I pressed and held backspace to delete what I'd written, and there was a lag of a few seconds.
2. The lag is approximately 1 second per word typed into the buffer (so I typed out "This is the stress test" - 5 words - and got a five second lag) Again, I'm typing at around 70wpm
3. It's slightly longer than this on the last step, where I have Draft>Folder1>Folder2> *new document* - but not by much, an extra second or so.

Also, can you tell I did a science degree?? I'll be giving margins of error and control groups next... 8)

Finally, I can confirm that shutting down Scrivener and restarting it seems to eliminate the lag. So having closed the program and reopened it, when I type in the Draft>Folder1>Folder2> *new document* - there is no noticeable lag, and it seems to be fine.

I haven't tried adding anything like synopses.
~I aim to misbehave~
"People should not be afraid of their Governments. Governments should be afraid of their people."

La
Laxaria
Posts: 125
Joined: Tue Oct 26, 2010 3:10 am
Platform: Mac + iOS

Wed Oct 27, 2010 5:47 pm Post

Finally, I can confirm that shutting down Scrivener and restarting it seems to eliminate the lag.


I'm taking serious potshots at why this fixes the problem:

#1: Scrivener's management of text and folders seems to be a little bit lacklustre than it could possibly be. Something in the code here is causing slowdowns, lags or unresponsiveness. I don't know how the code works, but it could be tracking issues with regards to how the program recognises each document. Shutting it down and restarting it refreshes the way it handles the individual documents and removes the lag.

#2: Scrivener hates Netbooks, but I think Lee has pointed out that they do intend to target NetBooks with the product.

At least I'm not the one experiencing the problem, so this might be worth looking into.

On a more curious note, does anyone experience this slowdown in normal usage over a longer period of time, like making 10-20 document files over the course of an hour? If this causes lag, then there could be a more concerning problem, since so far, our tests have involved speed and stress and not expected, typical behaviour in normal usage.

Ps
Psychomacologist2.0
Posts: 26
Joined: Tue Oct 26, 2010 4:28 pm
Platform: Windows

Wed Oct 27, 2010 6:02 pm Post

Ok, I did some further testing, and I think the problem may be in Scrivener trying to remember where everything goes. Having closed and reopened my test project, I eliminated the lag - however, I then went and moved the documents around a bit. At first, nothing. Then, sure enough, as I started to move more and more around, in and out of folders, and folders up and down the order - the lag started to appear when I tried to type. Not as badly as before, but definitely a few seconds delay.

Make of that what you will, Mr. Lee!!
~I aim to misbehave~
"People should not be afraid of their Governments. Governments should be afraid of their people."

La
Laxaria
Posts: 125
Joined: Tue Oct 26, 2010 3:10 am
Platform: Mac + iOS

Wed Oct 27, 2010 6:11 pm Post

however, I then went and moved the documents around a bit. At first, nothing. Then, sure enough, as I started to move more and more around, in and out of folders, and folders up and down the order - the lag started to appear when I tried to type. Not as badly as before, but definitely a few seconds delay.


Did that too but using the "Tutorial" file instead. Moved things around alot; into folders, out of folders, into drafts, deleting them, the like. The lag did start coming up.

It DOES seem that the way the program handles the files is causing some performance issues, but as of yet, still isolated to NetBooks and probably computers with weaker specs (ancient computers). Lee hasn't been able to replicate the problem on his own set-up though. Not the way I outlined it in the first post, anyway.

While I don't know if this is causing performance issues for anyone else, it is a step forward.

La
Lanie
Posts: 26
Joined: Tue Oct 26, 2010 7:49 pm
Platform: Windows

Wed Oct 27, 2010 7:32 pm Post

I copied some of my book from a Word doc, pasted it into a new project. Right now, I have 6 documents, 1 with over 4k words, 1 with a bit over 100, and the other 4 with around 800 words.

The lag right now isn't that bad when I type random words, but it is noticeable because I'm a fast typer. I didn't try timing it or anything, but I do notice it. I also made a doc then trashed it, then emptied the trash, but I can't remember where in my test I did that.

I duplicated a 800 word doc, then duplicated again and copied/pasted the text until there was 6k in it, there is a HUGE lag. I had to wait a few seconds before my "yup. There's definitely a lag" text to show up.

So, to recap: 8 documents in one folder. 4 docs with between 820-850 words, 2 with around 4,600, 1 with just under 6k, and one with 140 words. I did delete at least one doc at some point (can't remember how many words or when) and emptied the trash.


Specs: Word 2003 (don't know if it's relevant, but there it is anyway), Windows 7, and my comp is a HP Pavillion quad-core with 4gigs of ram.


ETA: I did use the auto-synop to most, if not all, of the documents--but they're only a sentence.

Mi
Mirrorscape
Posts: 17
Joined: Wed Oct 27, 2010 4:35 pm
Platform: Windows

Wed Oct 27, 2010 7:56 pm Post

Allright. At home and tried again.

(System specs are Windows 7 on an Asus Netbook with 2 gigs of ram and a 1.33Ghz Intel Atom CPU.)

Trying in the same project that I had lag in before now showed no lag, corroborating the idea that closing and reopening the project clears up the problem.
Messing around with the documents (not changing positions but just changing descriptions and labels) seem to create slight lag.

Decided to start over with an empty project to see if I could replicate the problem with as few documents as possible.

No lag with just one document and no changes.
Very slight lag (really only noticable when I type faster than I really can do and "mash " keys) when I change label, status and description in the inspector without going to the cork board.

Still only the starting document. Added some more description to the document. Slight lag when I "mash" keys. Nothing that is noticable when typing at normal speed.

Added another document via the green plus button. Noticeable lag of a second or so when I type fast but readable. Seems like the text stops updating while I type quickly and updates after slight lag whenever I take more than half a second to a second to continue typing.

Changed description of the second document. Noticeable lag when typing fast. Not sure if there is a difference between this lag and the one in the test before this one.

Changed the label of the new document while in corkboard mode. No noticable change in amount or behaviour of lag.



Note: There was no change in lag when I disabled the automatic spell checking.

User avatar
LAP
Posts: 1023
Joined: Tue Sep 21, 2010 5:25 pm
Platform: Windows
Location: Sydney
Contact:

Wed Oct 27, 2010 8:27 pm Post

Thanks everyone. I'm still concerned about this issue. I'm finding it hard to duplicate - even on my old XP machine with 1GB RAM. Sure the dictionary partial fix should have helped a little?

Thank you for all you detailed testing.

Lee

Ps
Psychomacologist2.0
Posts: 26
Joined: Tue Oct 26, 2010 4:28 pm
Platform: Windows

Wed Oct 27, 2010 8:36 pm Post

Further to the above, it might be worth noting that when I'm doing the test, I've got other things running as well. A USB mobile internet dongle; Skype in the taskbar, Firefox with two tabs open etc. CPU usage is hovering around the 10% mark as is. Could all these other processes be contributing to the slow down? I'm guessing so but I'm no expert on these things.

You're doing a grand job there Lee at any rate!! :D
~I aim to misbehave~
"People should not be afraid of their Governments. Governments should be afraid of their people."

La
Laxaria
Posts: 125
Joined: Tue Oct 26, 2010 3:10 am
Platform: Mac + iOS

Thu Oct 28, 2010 12:57 am Post

Sure the dictionary partial fix should have helped a little?


I'm afraid not, sorry.

Could all these other processes be contributing to the slow down? I'm guessing so but I'm no expert on these things.


Possibly, but more to the overall responsiveness of the program. I don't think it will be too significant, since the program is quite ok from a fresh open.

Mi
Mirrorscape
Posts: 17
Joined: Wed Oct 27, 2010 4:35 pm
Platform: Windows

Thu Oct 28, 2010 8:19 am Post

Small thing I noticed during my tests yesterday that might help is that when I was experiencing lag when typing in the documents, I still experienced no lag at all when typing descriptions for scenes.

I will be working at my desktop computer today and will see if I can replicate the problems there or if it is only occurring on the netbook. Also I will be trying to get an hour or two of actual writing in and will use the scrivener beta on whichever platform gives me the most trouble to see if the problem will arise under normal day to day use.

Mi
Mirrorscape
Posts: 17
Joined: Wed Oct 27, 2010 4:35 pm
Platform: Windows

Thu Oct 28, 2010 11:07 am Post

Succeeded in replicating problem on Desktop. (Running on Windows Vista Home Premium edition, Service Pack 2, Intel Core i7 at 2,67 Ghz and 6 gigabytes of memory).

Having read other thread about lag and CPU usage I kept an eye on the CPU usage and noted those numbers. For what they are worth here are the notes I made during these tests:

[*]Testing testing testing to see if there is any slowdown at all..
No lag. Usage 1% CPU

[*]Testing again after adding description via Inspector. No lag. Usage 1% CPU

[*]Testing again after using the corkboard to add description no lag. Usage 1% CPU

[*]Trying again after adding several documents, but before changing anything else. CPU 1%

[*]Trying again after adding description via notecard. Somehow there was a big spike in CPU but I have no idea why it showed up. No lag. CPU 1-2% 1,96 memory.

[*]Changed label of the second scene to concept while changed to corkboard mode. No lag. CPU 1%

[*]Changed status of second scene to revised draft. CPU rises to 3-4 % while just hitting keys quickly at random and to 5% while holding backspace to get rid of the text.

[*]Changed title of second scene using the notecards in the corkboard mode. CPU usage while “mashing” 5% same while holding backspace to erase.

[*]Added title to all but one of the scenes. CPU usage rises to two percent while typing normally. CPU usage 6% while mashing. 7% while holding backspace pressed.

[*]Added labels to all the documents in the draft. CPU usage 2-3% while typing normally. CPU usage 7-9% while mashing keys. Topping out at 9 percent while holding down backspace.

[*]No changes but have gone to the draft corkboard view a few times. CPu rises 3-4% while typing at my normal speed. CPU usage 6-9% while mashing keys, 8-10% while holding down the backspace key.

[*]Gone back and forth between Draft and the second scene document an additional number of times. CPU 3-4% while typing at normal speeds. CPU usage 13% while mashing keys and the same while holding down the backspace key.

[*]Changed view of draft to text view and clicked back and forth between this and the second scene about ten times. CPU usage tops at 5% while typing at my normal top speed. CPU usage 13-14% while mashing keys and 13% while holding down the backspace key.

[*]Changed the draft document view back to corkboard view and went back andf forth between that and the second scene about ten or so times. CPU usage tops at 7% while typing at normal speed. CPU usage 14% while mashing keys for extended period. IMMENSE lag before text shows up and only two lines of characters show up. CPU usage of 14% is constant (except for a brief spike of 21%) between the time I stop pressing keys and the time the text shows up. CPU usage 14% while keeping backspace pressed to delete the “mashed” text.



After this test I closed the project and opened a new blank project. Without changing anything else I just clicked back and forth between draft and the untitled scene under draft in the binder a number of times. CPU usage when just pressing keys quickly 7-8% about same when erasing the text again by holding down backspace.
Then, without any changes I clicked back and forth between draft and the untitled scene several times again (10 to 20 clicks?) and CPU usage rises to 12-13% when "mashing" keys and 11-12% when keeping backspace pressed.


Hope this helps!

Ed
Eddy
Posts: 197
Joined: Wed Feb 03, 2010 8:00 pm
Platform: Mac
Location: Brighton, UK
Contact:

Thu Oct 28, 2010 12:06 pm Post

I attach a file called 'LotsOfWords.zip' which contains an RTF file that I've been experimenting with in the Windows Beta. It contains 144,414 'words' according to the counter, although the content is just a repeated numbered list of the voice names in one of my synthesizers so it's not 'proper English'.

If you transfer this file into Scrivener by any means (I used cut and paste) and navigate to the middle somewhere, then type really fast you may see the same lag I'm experiencing.

Rather than type 'properly' just mash lots of keys:
sdfksdjf lks fklsjhf skjfhs kdfhs fkjshdf ksdjfh skdfhs klfjshd fkls :)

I turned off 'Check spelling as you type' but it didn't seem to make much, if any difference. Actually, I turned it off while in the middle of the file, and Scrivener crashed completely as soon as I unchecked the box. I waited 10 minutes to be sure, then task-manager'd Scriv to death and re-ran it. It loaded the project back ok, albeit with a few seconds delay. The spell check was disabled on re-run so it must have crashed after that setting was saved.

I also get about 3 seconds delay when I select the file in the binder.

The test machine is 2.2Ghz Xeon, 1Gb RAM, plenty of free disk space.

I'm sure you guys are doing similar tests, but this is the data I was getting the bad lag with so maybe, just maybe, it'll help :)

Eddy
Attachments
Screen shot 2010-10-28 at 13.13.33.png
Screen shot 2010-10-28 at 13.13.33.png (34.27 KiB) Viewed 1605 times
LotsOfWords.zip
A file containing 144,000+ words for testing in Scrivener Windows Beta
(202.48 KiB) Downloaded 62 times
"Writerʼs block is just a symptom of feeling like you have nothing to say, combined with the rather weird idea that you SHOULD feel the need to say something." - Hugh MacLeod

La
Laxaria
Posts: 125
Joined: Tue Oct 26, 2010 3:10 am
Platform: Mac + iOS

Thu Oct 28, 2010 12:26 pm Post

I think there are two things at work here, but are probably intertwined.

We know for a fact that working with extremely large .rtf files within Scrivener (40k+ words?) will cause immense lag when trying to type within the program for that particular .rtf file.

What we want to try is to isolate what could lead to greater lag or performance slowdown independent of large .rtf files.

Mirrorscape's testing has, perhaps, suggests that the problem may have to do with some underlying problem within Scrivener itself for Windows, but it is hard to determine the root cause. The best guess we have right now is going through the procedures that causes observations of lag spikes until we try to narrow down on the likely possibilities. It *perhaps* has to do with how Scrivener handles files within the program, or how Scrivener tracks them.

La
Laxaria
Posts: 125
Joined: Tue Oct 26, 2010 3:10 am
Platform: Mac + iOS

Thu Oct 28, 2010 1:25 pm Post

Updated my 2008 C++ Redistributable and .NET Framework to .NET Framework 4.

The lag seems to have decreased, but repeating the same steps in the first post will eventually result in lag again.

Other observations:

1. There is little/no lag when I edit the synopsis in the Corkboard view despite being extreme lag in the editor mode.

2. There is little/no lag in Outliner Mode, but it is there in Editor Mode.