I am evaulating Android Chart and have modified on of the supplied samples (Pan and Zoom weather data) to load more data (30 years EOD data), and it is really slow adding datat to the SimpleDataAdapter - many seconds in the emulator and 10s of seconds on a real device. Once the data is loaded and bound to the chart, it runs really smooth.
The reason for this slow behavior seems to be related to the logging:
11-04 08:48:54.006 D/dalvikvm( 3736): GC_EXPLICIT freed 451K, 18% free 8378K/10164K, paused 0ms+1ms, total 9m
11-04 08:48:54.886 I/monodroid-gc( 3736): 46800 outstanding GREFs. Performing a full GC!
11-04 08:48:54.978 D/dalvikvm( 3736): GC_EXPLICIT freed 981K, 23% free 7876K/10164K, paused 0ms+1ms, total 6ms
11-04 08:48:55.806 I/monodroid-gc( 3736): 46800 outstanding GREFs. Performing a full GC!
11-04 08:48:55.886 D/dalvikvm( 3736): GC_EXPLICIT freed 245K, 24% free 7748K/10164K, paused 0ms+0ms, total 5ms
this GC logging continous.
I guess the reason is that for every data point that is added a DataPoint is created (implenents IJavaObject) aswell as a new Java.Util.Data (also implenents IJavaObject). All these causes a cross VM reference to be created and very soon the GREF max is hit causing this extensive GC activity.
I am lookin for some more lightweigth way of passing data to the chart than having to create all those cross VM objects.