I have an app where users can select a specific theme for locations to display. I store the selected theme objectID in NSUserDefaults so that when the app restarts, the selected theme will still be intact.
Throughout the app I reference back to this selected theme. I currently have a class variable to hold the objectID, however I sometimes need to retrieve properties of the object itself (i.e. the name property). To do this I retrive the object from core data and then access my value.
I'm worried about the processing time required to do this, so my question - What is the better option ... ?
1) Store the objectID in memory and query core data to retrieve the object each time I need to access a property. I think this is cheaper in the sense that I have less memory usage, but more expensive in processing.
2) Store the actaul ojbect in memory and then simply access the object whenever I want. I think this is cheaper in the sense of processing, but may be more costly in memory usage.