Reputation: 5341
Is there a limit of how many files can be included in an app? Is it OK to have 20K small files in the app (only 10 at most will be read at the same time), and how does it impact the performance?
Upvotes: 5
Views: 602
Reputation: 13222
There is no limit on number of files that can be stored in the app bundle. Performance wise I'd say no issue as long as you do not perform file IO on main thread. You can use NSOperation
and queue or GCD to perform the file read/write routines.
The only limitation, to say, would be the OTA limit which is 50MB. If your application file size exceeds this limit, your app cannot be installed via OTA.
PS: I do not know why you are storing 20K files, but as suggested by Wain in his comment, you can definitely check if using CoreData/SQLite can suffice.
Hope that helps!
Upvotes: 1
Reputation: 11770
No, there is actually not such a limit. It does not affect the performance of the app unless you don't read them all at the same time :) Good Luck!
Upvotes: 2