views:

28

answers:

2

Hi,

I have to save about 1kb of text. The text is not updated very often (about once a month). But is read once every time the app is started.

Would saving it to NSUserDefaults slow down the reading/writing from/to NSUserDefault? Would it be better to save it to a text file in the documents folder?

Thanks in advance!

A: 

My guess is that you won't ever know the difference. Just put it in the defaults. If you want to be sure, do a benchmark test.

Joseph Tura
A: 

I'll give my 2¢ that 1kb seems kind of "heavy" for NSUserDefaults usage.

Considering NSUserDefaults syncs periodically, you might be better off placing said text in the User's Documents directory.

joshpaul