Hopefully I can get a response from someone on the android dev team to answer the questions I have.
I work on a project for the Army that will be used by our soldiers. Our problem is that the content provider interface that Android provides is too slow. We have run hundreds of tests to gather data, and by direct comparison with SQLite calls (inside and outside a content provider), have concluded that content provider is too slow for our project. When building our content provider and timing the direct database actions, the database actions are very quick; however, getting that data back to the entity that needs it is slow. We are thinking that we will have to implement our own system to notify data observers. In many ways, we would still like to use something like Content Provider that is more conventional.
Are there any plans for google to write a better content provider/resolver?
As an unrelated side note, we also have noticed that Android doesn't provide SQLite's full functionality (such as Write Ahead Logging intoduced in sqlite 3.7, I think) which would also speed up our data access. Our system constantly hammers the database with small reads and writes, so this (for concurrency reasons) would be beneficial. Using JNI, we utilized the sqlite C library in worst case scenario tests and WAL mode was much faster for us (we do not have large data insertions). When the database is constantly being read in journal mode (the default), writes cannot occur as often as they should because read calls are blocking access.
Also, why does Android required one to close a cursor? The way that sqlite is built, a close call isn't necessary when using it natively, (garbage collection will clean up the cursor). We often have to track down open cursors because they are bringing the system down in a matter of speaking. It is not like these are open-query-close in one method type interactions either, so it is easier for us to accidentally leave a cursor open.
Thanks!