Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS app: max number of files and impact of 20K small files?

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?

like image 410
hzxu Avatar asked Oct 22 '22 02:10

hzxu


2 Answers

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!

like image 151
Fahri Azimov Avatar answered Oct 24 '22 04:10

Fahri Azimov


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!

like image 43
Amar Avatar answered Oct 24 '22 04:10

Amar