Daily iOS
Persistence

Faulting and save

You fetched 10,000 objects from Core Data and memory barely moved, and then it grows a little as you scroll the list. Explain what's going on inside.

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

A fetch creates only shells (faults) and fills them from the row cache or SQLite when you touch a property (faulting). That's why memory grows a little at a time as cells read values while you scroll.

Share a question