Re: UIDocument + NSFileWrapper, how to get incremental saving to work?
Re: UIDocument + NSFileWrapper, how to get incremental saving to work?
- Subject: Re: UIDocument + NSFileWrapper, how to get incremental saving to work?
- From: Markus Spoettl <email@hidden>
- Date: Sat, 24 Aug 2013 23:31:28 +0200
On 8/24/13 8:07 PM, Quincey Morris wrote:
So I went and implemented my own -writeContents::::: that essentially calls
the root package wrapper's -writeToURL:options:originalURL:error:. This
method's documentation states that it implements incremental saving by using
hard links for unchanged content. Still, the performance is unchanged compared
to UIDocument's own implementation.
What file wrapper are you returning from 'contentsForType:error:'? Are you
constructing it there? If so, that might explain why all the files are being
re-written.
Normally, you'd keep track of the file wrapper originally passed to
'loadFromContents:ofType:error:', and return *that* at save time, after
replacing the sub-wrappers for any files that have changed. Using that approach,
I've never run into a problem with the hard-linking optimization for unchanged
files.
That's exactly what I'm doing. My save times are so bad, the only explanation
that I can come up with is that UIDocument/NSFileWrapper isn't really
hard-linking unchanged wrappers. Or it does and also does something else to
counter the gain.
Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________
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