So, I'm working on an app that is accessing an existing content provider
which holds a significant amount of data. I will be querying and updating
this content provider frequently, and it has proven to cause noticeable
delays due to the constraints that are required for these queries. I am
wondering if it would be quicker to load the data into a local SQLite DB and
use that to query/update, then commit the data less frequently (like when
the app finishes). I'm hoping that since I can create custom tables and use
raw SQL queries, the responses will be faster, and I can do the updating to
the actual content provider in the background, when the user won't notice.

Yeah, I could just try it rather than asking, but I also want to know if
this is good practice for Android. Or maybe I'm thinking the wrong way and
this is actually what you're supposed to do in a case like this?

...Also, I'm lazy and I didn't want to do all the work only to find out it's
just as slow :P What can I say?

Thanks




On Thu, Jan 15, 2009 at 6:31 PM, A T <somecs...@gmail.com> wrote:

> You are right about that :)
> Yeah, so, in other words, it doesn't sound like a problem I'm going to be
> able to solve here and now, for the project I'm working on.
>
> Ok, no worries. I'm sure I'll figure something out. Thanks again for your
> help!
>
>
>
>
> On Thu, Jan 15, 2009 at 4:18 PM, Mark Murphy <mmur...@commonsware.com>wrote:
>
>>
>> > Ok, I did not realize that. I had made the assumption that they were all
>> > DB-based.
>>
>> Some will be, but I'm under the impression that ContentProvider was
>> specifically designed not to force it. For example, some people are using
>> ContentProvider to serve static Web content to a WebView, which IMHO
>> doesn't fit a database pattern terribly well.
>>
>> > Anyway, I guess I will have to figure out some other way, then. If
>> anyone
>> > has any suggestions, I welcome them :)
>>
>> I'm sorry if I sounded too harsh in my previous response.
>>
>> Given time and effort, you could:
>>
>> -- Design a way for ContentProviders to support OPTIONAL additional
>> interfaces that provide some of the hooks you seek
>>
>> -- Modify the built-in ContentProviders to support those interfaces
>>
>> -- Submit both as patches to Android and hope they are approved
>>
>> However, the keys are "time", "effort", "OPTIONAL", and "approved", none
>> of which might line up with your near-term objectives...
>>
>> --
>>  Mark Murphy (a Commons Guy)
>> http://commonsware.com
>> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>>
>>
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to