We’ve been asked by several users whether Scrivener will be supporting Versions any time soon. The short answer is “no” - the only way Scrivener could support versions is by dropping some of its core features. For those interested, though, the full explanation follows.
There are two types of window-based programs on OS X, essentially:
-
Document-based programs. These are programs in which you work on different documents in different windows, such as TextEdit, Pages, Word and so on.
-
Shoebox applications. These are programs that have a single window interface that allows you to manipulate multiple files. Examples include iTunes, iPhoto and suchlike.
Lion’s new “Versions” feature works for programs of type (1). Scrivener is, technically, of type (1) - each project you work on opens in a different window. However, Scrivener is in some very important ways a bit of a mix - it also has aspects of type (2), because each project contains multiple files and the binder gives you access to them.
One of the main differences between document-based programs and shoebox applications is the way they save. Document-based applications tend to save the entire document every time you hit Save or an autosave kicks in. Every time you save a Pages, TextEdit or Keynote file, the entire file is written to disk. Shoebox applications, on the other hand, can contain a lot of data - you wouldn’t want your entire iPhoto or iTunes library to get rewritten to disk every time you added or edited a photo or song. So instead, shoebox applications only ever save to disk the changes made - the particular song you’ve added or photo you’ve edited - along with any necessary meta-data.
You may have noticed that Versions only appears in document-based applications; you don’t find it in shoebox applications such as iPhoto or iTunes. And this is important, because Scrivener’s saving mechanism is much more like a shoebox application. In order to support the importing of research documents - PDF files, image files, movie and sound files and anything else - Scrivener uses a saving mechanism more inline with shoebox applications than document-based programs. When you load a .scriv project, all that gets loaded into memory is the binder structure, the search indexes, and any files that are open in the editor. Other files get loaded “lazily” - that is, only when needed. When you click on another file in the binder, only then is it loaded from disk and into memory. That way, even if you have a project with a gigabyte of research in it, Scrivener can load fast and won’t slow to a crawl, which it would if it had to load and hold in memory a gigabyte of data. Every time you make a change to a document in a Scrivener project, Scrivener takes note of the fact you have changed that document. At the first opportunity - after the autosave delay and no activity - Scrivener saves any files it notes as having changed to disk along with the updated binder structure. All other files that weren’t changed are untouched. So, if you have a project containing a 1,000 files and only change two of them, only those two will be saved to disk during the next save cycle. This keeps things very fast and reduces the risk of data corruption, and in this way, Scrivener can support large projects and not worry about how many files the user is importing, or how large they are.
And this saving mechanism is why Scrivener is incompatible with Versions; Versions and Lion’s new autosave feature are inseparable, and both are built for use with document-based applications that save the entire document to disk each time there is a save or autosave.
In other words, to support Versions, Scrivener would have to load the entire contents of the .scriv file into memory on project load and save the entire contents of the .scriv file every single time you save or autosave kicks in. It would therefore need to ensure that .scriv files never grew too large, or else everything would become unusably slow; it would, essentially, need to completely drop one of its core features - the ability to import as much research as you want, of any file type.
So ultimately, the choice is between Versions and Scrivener’s research capabilities, and I think the advantages of the latter by far outweigh those of the former; users would rightfully be up in arms if Scrivener no longer allowed them to import research, or limited the amount of research they were allowed in any one project. Fortunately Scrivener has its own snapshots feature, though, which goes some way to making up for the lack of Versions support (and no, it’s not possible to have Versions work with individual documents within the project - Versions isn’t set up that way; it’s the entire project or nothing). And of course we have an automatic backups feature that can backup your entire project every time you open it, save it or close it (depending on your preferences).
I hope that explains the situation.
EDIT: I have paid for and submitted a technical support request to Apple on this issue, in order to explore all options. Hopefully an engineer will either be able to provide a solution or, in a worst-case scenario, confirm that Versions is indeed not compatible with this saving model.
All the best,
Keith