Performance with keyed archives
Performance with keyed archives
- Subject: Performance with keyed archives
- From: Will Mason <email@hidden>
- Date: Wed, 24 Nov 2004 16:44:29 -0800 (PST)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
I'm testing archving large collections of objects using both keyed and
unkeyed archives. In both cases I'm using the non-keyed coding methods
of NSCoder because I don't need to refer to all 10,000 objects by name
in the keyed archive. Each of the 10,000 objects is a pair of objects,
so in reality 20,000 objects are being coded. Here are timings of the
operations, and in all cases the exact same collection of objects is
being coded:
NSArchiver takes 0.344503 seconds to encode the collection.
NSUnarchiver takes 0.295801 seconds to decode the collection.
NSKeyedArchiver takes 41.806783 seconds to encode the collection.
NSKeyedUnarchiver takes 22.912641 seconds to decode the collection.
This means that NSKeyedArchiver is more than 121 times slower than
NSArchiver, and NSKeyedUnarchiver is more than 77 times slower than
NSUnarchiver.
My question is, can anything be done about this? Also, how can the
performance of NSKeyedArchiver be so pathetic even when it's encoding
things without keys? Also, with such an enormous performance difference
why are we being told in the documentation that keyed archives are to
be preferred, as surely there are situations where performance matters
to people?
Has anyone seen anything like this before? Can I improve the
performance?
Thanks for any advice,
Will
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden