UIDocument + NSFileWrapper, how to get incremental saving to work?
UIDocument + NSFileWrapper, how to get incremental saving to work?
- Subject: UIDocument + NSFileWrapper, how to get incremental saving to work?
- From: Markus Spoettl <email@hidden>
- Date: Sat, 24 Aug 2013 15:15:29 +0200
Hi,
I have an iOS app that uses UIDocument in conjunction with a document package
that is implemented through NSFileWrapper.
It seems no matter what I do, I can't get incremental saving to work. The more
sub-wrappers my package wrapper contains, the longer it takes for the document
to get saved. It doesn't matter how many sub-wrappers actually changed, the time
it takes to save increases with the number of wrappers.
The documentation in UIDocument's
-writeContents:toURL:forSaveOperation:originalContentsURL:error: helpfully
states that if one wants incremental saving, one has to implement it there. I
took that to mean that UIDocument's use of NSFileWrapper doesn't support
incremental saving for some reason.
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.
Which makes me think that NSFileWrapper isn't really doing what it allegedly does.
Any ideas what I might be doing wrong, or what alternative I could try?
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