The title pretty much sums it up, when reading data stored in the NSUserDefaults for an iphone app, are there any performance considerations that need to be made?
Is there anything I'm misssing, or is reading from NSUserDefaults trivial, and can be abused to a developer's heart desire?
At runtime, you use an NSUserDefaults object to read the defaults that your application uses from a user’s defaults database. NSUserDefaults caches the information to avoid having to open the user’s defaults database each time you need a default value. The synchronize method, which is automatically invoked at periodic intervals, keeps the in-memory cache in sync with a user’s defaults database.
As far as the documentation says it's pretty safe to use it as long as you avoid calling the synchronize
too often. You can read more details about it here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With