0

I am implementing a MapFragemt (using a hack to the compatability support lib that makes all FragmentActivities MapActivities). The Activity displays some overlays on the map (0-30) and the users current location. The activity contains on fragment(the map) and an actionbar. In the fragment I am using MyLocationOverlay and the LocationManager to get the users location. The problem is the Activity becomes very slow and unresponsive(5-10 to respond to button presses, scrolling,etc) if left open for a long period of time.

Nearly identical code is used (same fragment and nearly the same activity) for the phone version of my app and the problem does not occur on phones. At first I thought it may be a memory leak, but I have not been able to find any problems by doing memory analysis. Also the amount of memory used by the app appears to stay about the same overtime. I am testing on Honeycomb 3.2. It does not happen on ICS for phones(I have not test on ICS tablet).

Has anyone had this problem?? I have not posted code, because I don't really know where to start. Any help would be great!

Patrick Jackson
  • 18,766
  • 22
  • 81
  • 141

1 Answers1

0

I had the same problem.

I was using a parcelable in a bundle to pass overlay item data to my map fragment. The parcelable was using writeSerializable which the docs warn not to use because of overhead.

Check if you removing your overlays improve performance. If so, it's probably something you're doing with the backing data set.

Jereld
  • 162
  • 7
  • was the app slow all the time? My starts out great and the longer it runs the slower it gets. Believe it is a memory leak, but I haven't traked it down yet – Patrick Jackson Jun 03 '12 at 18:17