Issue
I have a MapView in which I place some ca. 200 Overlays, all with the same picture. I get the location-data with Restlet. But that shouldn't be the problem, because I get the Data fast enough.
The problem is, that the MapView is very slow. The performance decreases with the count of the Overlays, but it shouldn't, cause on the iPad, there's an app, which can do this easily. My Tablet has even more Ghz. The Tablet is loading parts of the map again and again, even when I don't scroll on it.
So I think that I'm doing something wrong. So I have some questions:
LogCat says:
GC_CONCURRENT freed 287K, 6% free 7222K/7623K, paused 1ms+2ms
and repeats this, trying to get some space continuously. Is it possible that this is the problem and the cache filled too much?Is it possible that the shadow of the Overlays costs pretty much performance? How can I delete them?
How can I delete all the data with pressing the back button? What do I have to insert into
onStop()
andonDestroy()
? As I know, the Garbage Collector is doing all this stuff automatically. What else could I do? Remove Overlays?I use cases like:
minLatitude = (minLatitude > partnerLatitude) ? partnerLatitude : minLatitude;
and for-each:
for(BrunnerPartner partner: query) { partnerAL.add(partner); }
Are these bad for performance?
Would it help me if I would hide some Overlays when the zoom span is small? How could I do this?
Solution
Take a look at the OverlayItem example: http://developer.android.com/resources/tutorials/views/hello-mapview.html
Using individual overlays introduces a large amount of bloat.
Answered By - CircaLucid
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.