kingrukawa / acra

Automatically exported from code.google.com/p/acra
0 stars 0 forks source link

Data collection time is too long #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It looks like the time of data collection during the creation of a report is 
quite long and make the UI freeze for a moment. Might be longer on 1.X android 
version.

Original issue reported on code.google.com by kevin.gaudin on 4 Dec 2010 at 4:13

GoogleCodeExporter commented 8 years ago

Original comment by kevin.gaudin on 4 Dec 2010 at 4:16

GoogleCodeExporter commented 8 years ago

Original comment by kevin.gaudin on 4 Dec 2010 at 4:19

GoogleCodeExporter commented 8 years ago
Interesting point: a simple "new Date().toString()" takes 3927ms on Android 1.5 
emulator and 20ms on Android 2.2 emulators. 

Original comment by kevin.gaudin on 4 Dec 2010 at 4:27

GoogleCodeExporter commented 8 years ago
Replacing it with android.text.format.Time reduces to 80ms on 1.5 emu but 
increases it to 80ms on 2.2...

Original comment by kevin.gaudin on 4 Dec 2010 at 4:47

GoogleCodeExporter commented 8 years ago
Saving the report to a file was also an issue:
  * on android versions prior to 2.0, storing with Properties.store() was taking nearly 4 seconds because of the always present comment header which is calling new Date().toString(). Switching to Properties.storeToXML() reduces this time to 0.5s
  * on android versions from 2.0 and later, Properties.storeToXML() takes 1.5s for a reason still unknown to me.... and Properties.store() takes only 0.2s.

So, I implemented storeToXML() for API levels < 5 and kept store() for others...

Original comment by kevin.gaudin on 5 Dec 2010 at 1:39

GoogleCodeExporter commented 8 years ago

Original comment by kevin.gaudin on 22 Dec 2011 at 9:06