Re: Collections can be simple Attributes in Core Data
site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com On 2008 Sep, 25, at 18:08, Jerry Krinock wrote: Conclusion _______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.apple... I'm surprised that I've never seen this discussed or documented. Is this going to get me into any trouble? So far I haven't seen any trouble, but some quick tests indicate that when subsequently invoking -[NSManagedObjectContext save:], the cost of storing an NSSet-of-NSStrings attribute is many times the cost of storing a simple String attribute, if you leave the NSSet's "Transformer" field blank and thus use the default transformer, which is probably NS/Un/Archiver. I was able to recover the performance hit by implementing a custom transformer. Sorry, I did not take the time to isolate and measure the effect of all the factors affecting performance, because after my transformer was written and tested, ^any^ performance improvement, for me, was free :) My transformer for this case UTF8-encodes strings to datas, then concatenates the datas with NULL delimiters. Escaping is not necessary since UTF8 encoding will never produce a NULL. This email sent to site_archiver@lists.apple.com
participants (1)
-
Jerry Krinock