Ahmed Z.
Ahmed Z.

Reputation: 2337

Application getting slower after each data insert in Core data

I have an inventory application built on Cocoa where the user saves the data. Currently after 50 entries the core data file size has become ~2.5GB. Issue is that when I start the app it takes forever to read the contents of the core data and populate it in the list.

Does anyone have advice on how to manage such scale core data in a cocoa application.

Upvotes: 0

Views: 55

Answers (1)

Catfish_Man
Catfish_Man

Reputation: 41831

If your database is 2.5GB after 50 entries, that implies that each entry is as much as 50 MB. Unless you have a truly enormous amount of information stored in each entry, I'd guess that implies that you're storing images or other "data" files in the database.

Have you considered instead storing them in separate files, and storing file URLs in the database? That could reduce the size dramatically.

Upvotes: 2

Related Questions