I am working on an 'interactive map', similar to this example. I needed to be able to zoom in the map and still get a clean illustration, so the drawing of the map is done in svg (it actually was created in Illustrator, then saved as svg file).
In the app, I create a UIWebView and load the html containing the svg. The HTML file is a bundle resource in the app, so there's no network delay. There are tappable shapes that when you tap them, it brings you to another map (another html page with an svg drawing).
One of the svg is rather large (~5.8MB). When loading, I get 'Memory Pressure' warnings then it crashes. Instruments shows Virtual Memory at 298.71MB and Real Memory at 149.10MB at time of crash.
I already simplified the drawing (I took out some details), and I also used @Peter Collingridge svg optimizer.
How can I optimize memory use so it won't crash?