I have scratched my head for a long, long time, but I do not know yet The way to do this efficiently and without using too much memory at one time (on iOS, where the memory is very limited)
I have essentially very plain text files (15 MB on average), which I need to import paras and core data.
My current implementation is to be an article unit on the core data, in which there are "too many" relationships with the page unit.
I am also using a slightly modified version of this line reader library:
Naturally, the more page I create, the more memory overhead I create ( On the top of the actual NSString lines).
No matter how much I do the quantity of rows per page, or the quantity of characters per line, the memory usage is completely insane (~ 300 MB +), while the whole text Importing the file as a string only has an extreme limit of ~ 180 MB and it ends up being a matter of seconds, it takes a few minutes in the past.
The line reader may also be on its own fault, because I am refreshing pages in the managed context, which should leave them with my knowledge.
At any rate, does anyone have any notes, techniques or ideas about how I should go about implementing it? Ideally I want to support pages, because I need to be able to navigate the text, and later it's a lot of fun to load the entire text into memory.
Note : Articles & amp; The Page Unit method works fine after the import, but the import is automatically moving towards the overboard with the memory usage.
Edit: For some reasons, core data can also be removed ~ 300 MB when a paragraph unit from context references why it might be, or how it may be can be done?
Comments
Post a Comment