Reputation: 18558
I'm very new to Core Data and I'm still learning how it all works under the hood. My Core Data model hierarchy contains a user profile, which contains a set of ten different levels using a one-to-many relationship, with each level containing 30 different puzzles also using a one-to-many relationship.
UserProfile (x1) -> Level (x10) -> Puzzle (x30), for a grand total of 311 objects per user profile
The levels and puzzles models are used to store the user's progress as the user sequentially solves the puzzles. When the game runs for the first time, the game reads all the levels and puzzles data from a plist and generates Core Data objects (table rows) that will be used store the users progress as they play the game. In other words, the list of Core Data objects doesn't grow as the user plays the game, instead it's all created at the start and the properties of the objects change as the user plays the game. I suspect this is inefficient, tho my questions remain the same...
I apologize if these are outrageous questions and I apologize for their length, and thanks so much for your wisdom! I'm heading back to the Core Data docs right now, I just thought I'd post these questions while I continue the self-teaching.
Upvotes: 0
Views: 1105
Reputation: 667
This answers your 'lazy load' question. Core Data to-many relationships. Are they Lazy Load?
I wouldn't worry about 6MB of memory unless you see a performance issue. You can always check it with the included utilities.
Upvotes: 1