views:

123

answers:

1

When I fill in the encodeWithCoder: for objective c classes for an iPhone app will it make make the archive file larger if I use long keys as opposed to short keys for all of my variables?

For example if I use really long keys like this:

[coder encodeBool:myBoolean forKey:@"My_Excesively_Long_Boolean_Key"];

will it make the archive file longer than if I use stuff like this:

[coder encodeBool:myBoolean forKey:@"Key01"];

Assuming I have a large number of ints and BOOLs.

+1  A: 

Unless you have hundreds of thousands of keys, you won't see any noticeable size increase. On modern systems text is trivial. You could store tens of thousands of keys in a couple of megs.

The use of long highly unique keys, constants, class names, ivars etc is actively encourage because of Objective-C's open name space.

TechZen
That makes sense. Thanks:)
Jamvert