I have a custom UIDocument
consisting of a file package with many small files (about 3200 text files). The overall size of the document is only ~600KB, but my app crashes each time I attempt to open the document due to low memory.
I tracked it down to the place where UIDocument tries to map the folder to an NSFileWrapper
.
The document is displayed in a table, so at the most I would need to load only 20 files from the file package at once.
Is there a way to only "partially" load an NSFileWrapper
or some other form of lazy loading (I'm not talking about memory mapping, since the problem is about many small files)?