My app is downloading base64 encoded content, in most cases PDF documents. It is transferred via web service and wrapped up in SOAP. The documents can reach sizes of up to 100 MB.
To store these files locally, I need to extract them from the SOAP envelop, decode the base64 string and write to storage.
Problem is, that a document of about 1 MB increases the temporary memory usage by 20-30 MB. When tracking allocations in Instruments, I can see those peaks. This isn't so much a problem. But a document of 60 MB increases memory by around 800 MB, and that's definitely too much for iOS devices.
I'm trying to change the app so that the peaks can be prevented or at least lowered. Alas, I don't exactly know which lines of code are responsible.
Is there a possibility to step through the code and also view current allocations or memory usage at the same time?
I know stepping through doesn't work when app is executed by Instruments. So, are there any other options?
Here is how Instruments looks like:

Thanks in advance!




