Long save times

Hi there,
I’m noticing that Saving a project takes several seconds, even to an SSD drive. Backup is almost instantaneous. I realize these are not the same thing, but I am a long time software development guy. I’m flabbergasted as to how much data could possibly be in my scrivener project that could make it take so long to save, especially compared to a backup.

The reason I want to understand is because I am paranoid about data retention. I’d like to know if the backup has substantially less data than the save files, and the nature of those differences. Would I be better off backup up the saved project instead of using the backup? That sort of thing. I don’t like it when data behaves strangely–it makes me lose confidence in my backup strategies.

Any input would be greatly appreciated!

Hi. All that I know (or think that I know), is that the backup is nothing more (or less) than a time-stamped zip (or clone) of the project’s folder.
So that is probably why it is so much faster than saving the project in your case. Or rather taking the normal time to be rewritten to disk.

In other words…

…beside the time-stamp and the zipping (if the option is checked), they are virtually identical.

It ain’t much, but it might be a clue.

[EDIT : ] If you have an issue when saving a project, it might not reflect so much on the time needed to backup the project if the problematic files were not modified since the last save when doing the said backup.

→ On second thought : one thing that seems strange in your description of the issue though [therefore the above EDIT], is that a backup actually saves the project first… So that is kind of weird if it is so much faster for you. (It should actually be the opposite. Save time + Backup time.)
Unless what we’re talking about here, ain’t saving the project, but rather doing systematic “save-as” as a mean of incremental backups ; in which case, your “issue” would simply make sense – or a bit more, the least. (Although I would qualify that as improper use, and would recommend refraining from doing things this way.)

As @Vincent_Vincent said, the two versions should be identical. In fact, the Save operation should be faster, since it only needs to save the files that were changed since the command last ran, while the Backup copies the entire project.

Now, are you using the standard Save command, or is this a Save As operation? Is the project shared with a “cloud” service of any kind?

Nope, it’s local to an SSD. It is indeed when doing Save As.

I mean, it’s an SSD and the data is, I presume, text. Should be pretty unnoticeable, right?

I can’t comment about the time durations you are reporting, but I do wonder why you do “Save As”. You do this routinely? What’s your purpose of making a new copy?

Feels to me like this an unnecessary action unless, of course, you have purpose.

I think you are working against yourself here.

I “save” (or let Scrivener do it automatically for me on change and my keyboard “inactivity” as they so wisely designed), and rely on Scrivener automatic backups only on exit the project. They optionally allow for automatic backups on opening the project. These Scrivener-created automatic backups, as @kewms says, is a “zip” compressed copy of everything. I also, of course, have (numerous) system level backups running routinely. I do test restores of the Zip files and system backups 2-3 times a year.

Let Scrivener and the computer do their things to protect your data. No need, IMHO, to intervene with “save as”.

Fun Edit: When I finish with a Scrivener Project, I close it and then as part of that process Scrivener saves any unsaved changes anywhere needed. Then Scrivener automatically creates a backup zip (as I told it to in Preferences) of the entire project. Then my system backup detects a change and does an incremental backup immediately. I haven’t the foggiest idea how long all that takes as upon “close” I step away from the computer and refill my coffee cup. (on my SSD iMac, I’m pretty sure it’s fast.)

1 Like

My drive is SSD, and a 100K words project save-as takes about 5 to 7 seconds. (Make that closer to 1 million words with the snapshots.)

It can only be as fast as the narrowest part of the funnel allows.
But if you are talking in the range of 30+ seconds, you might very well have an issue here.

Save As copies the entire contents of the project so yes, it should take about the same amount of time as a backup.

Not directly relevant to this thread, but please be aware that the Save As command is a very common cause of “lost” work. It creates a new copy of a project, and then continues working in the copy. It’s very common for people to then open the original version and panic because work done in the copy was “lost.”

If you want to make a copy of the project independent of Scrivener’s automatic backups, I recommend using the File → Backup → Backup To command instead.

I’m still rather curious why Save As should take several seconds? An SSD can write at something like 320mb/s–that’s 40 megabytes per second! Even allowing for lots of new file handles etc. I really really wonder just what the heck Scrivener is doing.

As I said earlier :

Computer busses/motherboard, disk, ram, cpu etc.
You get the speed of the slowest of them all.
I don’t think Scrivener does anything “special” here…

dude, no. these are modern computers. i have a project that’s less than 2 megabytes. if it even takes a full second something very weird is going on.

My name is Vincent.
. . . . .

2 Likes

One test would be to use Windows Explorer to make a copy of the project outside of Scrivener.

It might be less than two megabytes, but each element in the Binder involves (1) creation of a directory, (2) saving the RTF file with the actual contents into that directory, and (3+) potentially additional files for snapshots, footnotes and comments, etc. It adds up to a lot of individual files/folders very quickly, so it’s going to be much slower than copying a single 2MB file.

4 Likes

I think kewms is on to something. If you have 500 binder items, each with a synopsis, document notes, and text in the main part of the document, that’s 1 folder and 3 files created x 500 + all the other files and folders that make up a scrivener project.

A zip-compressed backup only creates 1 file, as it reads in all the files and folders, telling the zip compression tool to add that information into its compression routine before saving that (somewhat smaller) number of bytes to the singe file on your SSD. Your CPU is probably fast enough to do the compression faster than writing 500x4 folder/files+ entries onto your file system with no compression.

1 Like

This is a most insightful observation. It might be worth incorporating it as a cautionary tip in the manual and other documentations where backing up and related procedures are discussed.

1 Like

In addition to the file overhead issue others have explained to you, you may have some other service that is sitting in between Scrivener and the disk subsystem inspecting all of the I/O requests (anti-virus real-time scanners, etc.)

2 Likes

One last thing; “several seconds” doesn’t really give me an idea of how much longer Save As copies are taking to be created vs. a single backup file being created. When you say “almost instantaneous”, I’m guessing that’s less than 1 second, but does “several” seconds mean “about 5 seconds” or “nearly 20/30/50/100 seconds”?