If you do end up writing your own safe-saving logic, that's achieved by 
overriding -writeSafelyToURL:…

Sent from my iPad

On 2 Mar 2014, at 15:23, Trygve Inda <cocoa...@xericdesign.com> wrote:

>> 7,500 file operations of any kind are going to take some time, even just
>> creating hard links. Does it require 40 seconds? Well, I don't know. But I do
>> seriously doubt that it could be done in 1 second.
>> 
>> You might try it out yourself, write test code to create a new package, walk
>> through your package, and create hard links in the new to the old. If that
>> takes too long, then you're done, you can't do incremental save this way. 
>> (And
>> of course, if it's fast enough, then continue on this course and try to 
>> figure
>> out how to make it happen that way.)
>> 
>> It just seems to me that 7,500 files is bordering on being a database of
>> images, and calls for the typical database techniques. In other words, write
>> new image files into a temp location within the package, write a log of
>> changes about to happen, apply the changes (move the new files into place),
>> and delete the log. Then your recovery code checks for a log, if it's there
>> move any files still in the temp location into their proper final location,
>> and delete the log.
> 
> It is essentially a database of images.
> 
> How can I override the various NSDocument methods so that I can write the
> changes/updates myself in a temp place within my own package (which makes it
> safe).
> 
> There is just no reason to touch the other 7500 files at all.
> 
> 
> 
> _______________________________________________
> 
> 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/mabdullah%40karelia.com
> 
> This email sent to mabdul...@karelia.com

_______________________________________________

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

Reply via email to