Archiving objects on seperate thread
Archiving objects on seperate thread
- Subject: Archiving objects on seperate thread
- From: email@hidden
- Date: Thu, 19 Feb 2009 10:54:45 -0800
I have an NSDocument that has several NSArrayControllers worth of
data as well as a bunch of iVars. I can succesfully archive my
Document's iVars and my ArrayContollers' contents, and I can
succesfully implement NSDocument's autosave feature. However, and
this is a design limitation on my part, whenever I archive a
substantial number of objects from my NSArrayControllers (around
5000), my save operation can last upwards of 10 seconds (and there is
another discussion to be had about that since I profiled it in
Shark). This is unacceptable for autosaving as the UI becomes
unresponsive. Now I can easily create an NSThread and run a save
operation in the background to archive my data. But my question is
this: what risks do I have in changing data to an object that is in
the process of being saved?
Patrick
_______________________________________________
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