为什么INSERT和UPDATE慢于Android 4.0的? [英] Why are INSERTs and UPDATEs slower on Android 4.0?

查看:161
本文介绍了为什么INSERT和UPDATE慢于Android 4.0的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当Android 4.0的在2011年12月开始提供的Nexus S回来了,我们做了一些性能测试: <一href="http://greendao-orm.com/2011/12/17/sql-performance-in-android-4-0/">http://greendao-orm.com/2011/12/17/sql-performance-in-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/

奇怪的是,UPDATE和INSERT的性能更新后下降了一半(!)到Android 4.0在同一部手机。我们没有时间进一步调查,但同时也许别人做?

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

推荐答案

根据这个<一个href="http://developer.sonymobile.com/wp/2012/03/30/learn-about-the-technical-differences-between-gingerbread-and-ics/"相对=nofollow>索尼博客文章,差异似乎是由SQLite的Andr​​oid的API造成的:

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

在ICS的另一个变化相比,姜饼的是,谷歌已经移到   很多SQL从本机处理的Java层。在我们的   内部研究,我们已经看到,读取和写入操作的   SQL数据库需要更长的时间......

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

我想看到一个跟进调查,以更深入地研究这个问题,例如:比较的来源。此外,这是奇怪的是,索尼声称,读取性能比较慢,而我们的测量显示了〜40%的性能提升。

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.

这篇关于为什么INSERT和UPDATE慢于Android 4.0的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆