I have upgraded Google Maps v1 to v2 in my Android application.
And v2 was nice and so on BUT one method seems to be the slowest thing in my life.
Projection proj = map.getProjection();
Point point = proj.toScreenLocation(example.m_geopoint);
toScreenLocation(...) is so slow so the application slow downs to unusable slowmotion. The method updated maybe 100 times per frame but that works very very great on Google Maps v1.
And when I check in Android Console I see this:
10-06 13:53:04.460: D/dalvikvm(4889): GC_EXPLICIT freed 251K, 14% free 14622K/16839K, paused 3ms+5ms
10-06 13:53:05.859: D/dalvikvm(4889): GC_EXPLICIT freed 252K, 14% free 14622K/16839K, paused 2ms+5ms
10-06 13:53:07.222: D/dalvikvm(4889): GC_EXPLICIT freed 251K, 14% free 14622K/16839K, paused 3ms+6ms
...
This message is coming out all the time while the method is called.
And the difference between v2 and v1 is this:
pointOut = proj.toScreenLocation(geopointIn); // v2
projection.toPixels(geopointIn, pointOut); // v1
And the v1 seems to be more optimized solution. Is there some way to get it faster? Is it a performance bug?