Re: NSKeyedArchiver finishEncoding takes forever
Re: NSKeyedArchiver finishEncoding takes forever
- Subject: Re: NSKeyedArchiver finishEncoding takes forever
- From: Markus Spoettl <email@hidden>
- Date: Wed, 18 Jun 2008 16:31:48 -0700
On Jun 18, 2008, at 2:50 PM, Quincey Morris wrote:
I suppose you could byte-move each group of 4 doubles in one NSData
and give that to the archiver instead. Or do it further upstream and
make a bigger array of numbers in a NSData. (But you'll have to deal
with endianness and -- egads! -- floating point representation
issues across architectures yourself.)
I've now completed testing the third approach saving each ANode into
it's own NSData and writing a number of those into the file archive:
Optimization Write Time File Size
------------- ---------- ----------
None 4:48 min 17.2 MB
4-double NSData 0:10 min 38.3 MB
Upstream NSData 0:15 min 12.1 MB
Surprisingly the file size is 1/3 smaller with the latest approach,
the save time is still too long but much better than the original
(almost 5 minutes).
I'm not exactly sure about the speed, blocking the UI for 15 seconds
isn't the best idea and the real data will be even bigger. So, a cure
for NSKeyedArchiver's optimization would be great.
Anyway, this is certainly interesting to learn all this, thanks for
your help!
Regards
Markus
--
__________________________________________
Markus Spoettl
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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