Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are INSERTs and UPDATEs slower on Android 4.0?

When Android 4.0 became available for Nexus S back in December 2011, we did some performance testing: http://greendao-orm.com/2011/12/17/sql-performance-in-android-4-0/ enter image description here

Surprisingly, UPDATE and INSERT performance dropped by half (!) after the Update to Android 4.0 on the same phone. We did not have time to investigate further, but maybe meanwhile somebody else did?

One could speculate, that the file system changed, etc. but I'm looking for hard facts. ;)

like image 850
Markus Junginger Avatar asked Feb 12 '12 08:02

Markus Junginger


1 Answers

According to this blog post by Sony, the difference seems to be caused by the SQLite Android API:

Another change in ICS compared to Gingerbread is that Google has moved a lot of the SQL handling from the native to the Java layer. In our internal studies, we have seen that read and write operations to the SQL database takes longer time...

I'd like to see a follow up investigation to dive deeper into this issue, e.g. comparing sources. Also, it's odd that Sony claims that read performance is slower, while our measurements showed a ~40% performance improvement.

like image 72
Markus Junginger Avatar answered Sep 22 '22 16:09

Markus Junginger