I am working on an “interactive map” similar to this example . I needed to enlarge the map and still get a clean illustration, so the map drawing is done in svg (it was actually created in Illustrator and then saved as an svg file).
In the application, I create a UIWebView and load the html containing svg. The HTML file is the package resource in the application, so there is no network delay. There are stupid forms that, when clicked on, take you to another map (another html page with svg image).
One of svg is quite large (~ 5.8MB). When I boot, I get a warning “Memory pressure”, after which it crashes. The tools show virtual memory at 298.71 MB and real memory at 149.10 MB during a crash.
I already simplified the drawing (I took some details), and I also used @Peter Collingridge svg optimizer .
How can I optimize memory usage so that it does not work?
source share