24

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. ;)

Markus Junginger
  • 6,950
  • 31
  • 52
  • 2
    Just to be sure, were you using the stock 2.3? Because some ROMs really improve IO performance by using different file systems together with hacks – Beowulf Bjornson Feb 27 '12 at 20:51
  • Yes, stock OS. Version 2.3.6 if I recall correctly. – Markus Junginger Feb 27 '12 at 21:23
  • 1
    I'm interested in this too. ICS filesystem is noticeably slower than on older droids, and I can't see any obvious reason for it. – Reuben Scratton Feb 28 '12 at 10:33
  • 2
    If you take a look at the sqlite.git from the Android source tree there have been a number of changes between the two versions that are Android specific. I'd start there. – NuSkooler Feb 28 '12 at 18:04
  • Are your benchmark scripts accessible? I can't see them at your link. What was the test phone? – George Mar 01 '12 at 14:15
  • Check the original link (http://greendao-orm.com/2011/12/17/sql-performance-in-android-4-0/), I updated the post with a small how-to. – Markus Junginger Mar 02 '12 at 15:37
  • Browsing through the git repository I found the following commit (https://github.com/android/platform_frameworks_base/commit/a22d88493ea2a0cdd63b026c0d4b524d658a8e65), could this be related? Write ahead logging is supposed to be faster, but I don't know in which versions it might have been enabled. – Jörn Horstmann Apr 07 '12 at 21:18

1 Answers1

2

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.

Markus Junginger
  • 6,950
  • 31
  • 52