On Apr 19, 2013, at 5:51 PM, Jerry Krinock wrote: > > On 2013 Apr 19, at 13:58, Alex Zavatone <z...@mac.com> wrote: > >> "many developer type people would assume that a save of a document's data is >> a write of a delta of the data to a disk, which would take an amount of time >> that is so small that it would be transparent to the user". > > I think this is the model that Apple engineers had in mind when they designed > Auto Save. And it is plausible when coupled with Asynchronous Saving (on > background threads). But then, Asynchronous Saving was found to be > incompatible with Core Data. > > * * * > > Maybe you Steve and Alex Zavatone may be on to something there. You're > suggesting that, rather than handling the autosave when it is requested > during a long-winded operation, you turn autosave off *before* the > long-winded operation begins, so that you won't get any such requests. >
Bingo. > The problem with that is that the way you turn autosave off is by returning > NO from +autosavesInPlace, which is a class method. I ask then: Why did > Apple make +autosavesInPlace a class method, other than to make it difficult > to change on the fly? You could do it with a static or global variable, I > guess. Your results will definitely be interesting. Let us know what > happens. That's why I mentioned setting a BOOL and possibly subclassing part of autosave if at all possible. In the part where autosave says "hey, I'm going to check the conditions to start an autosave now". If there is a "next service interval to query for an autosave", that is accessible can you set that to the max integer value for the int type used and then restore it to what it was before when you are done with your transaction? > Finally, y'all should know that stashing the completion handler and invoking > it later was not my idea but rather an approach suggested by someones who is > way smarter than me. Certainly not me in that case. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com