My app has three different Activities that use a SupportMapFragment
. There is a major delay on the first load after starting the app. This slow load time does not occur on subsequent loads, even if I go back and access a completely different Activity (that also contains a map). I'm trying to figure out if this is something that I could fix.
This gist shows how I load the SupportMapFragment
. Using debug points I have determined that the slowness occurs between onViewCreated
and onStart
.
Update 1: Using Debug
I have taken two traces of the first load and second load. The second load is in a completely different Activity
. I quickly noticed that the first trace (the slow load) has a LOT of calls to java/util/zip/zipEntry
. I don't see any calls like that in the second trace. Also, this delay happens between onCreateView
and onViewCreated
of the MapFragment.
Update 2: This also happens with a MapFragment
(not support), except the delay is actually much longer.
Update 3: This SO question seems to be related. Also this one.