• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSDocument save incremental file package in-place
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument save incremental file package in-place


  • Subject: Re: NSDocument save incremental file package in-place
  • From: Trygve Inda <email@hidden>
  • Date: Sun, 02 Mar 2014 07:23:45 -0800
  • Thread-topic: NSDocument save incremental file package in-place

> 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 (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSDocument save incremental file package in-place
      • From: Mike Abdullah <email@hidden>
References: 
 >Re: NSDocument save incremental file package in-place (From: Scott Ribe <email@hidden>)

  • Prev by Date: Re: NSDocument save incremental file package in-place
  • Next by Date: Re: NSDocument save incremental file package in-place
  • Previous by thread: Re: NSDocument save incremental file package in-place
  • Next by thread: Re: NSDocument save incremental file package in-place
  • Index(es):
    • Date
    • Thread