Unfortunately I have to use the content provider, I have already optimized it a little using bulkInsert but I hadn't thought of deleting several entries at once.
If there definitely isn't a way to cache the content provider then I'll submit it as a feature request. Charles On Feb 2, 4:58 pm, Peli <[email protected]> wrote: > Good question. Indeed the URI has to be resolved with each query, > update, delete. > > If the ContentProvider supports it, you may try whether you are not > faster > 1) by deleting several entries at once: using delete on the whole > table, with appropriate selection clause > 2) by inserting several entries at once using bulkInsert (if the > content provider supports > this):http://code.google.com/android/reference/android/content/ContentProvi...[]%29 > > Finally, if you have so many changes to do, do they really have to go > into a ContentProvider? Maybe you are better off with a private > database: > > "If you don't need to share data amongst multiple applications you can > use a database directly via SQLiteDatabase. > "http://code.google.com/android/reference/android/content/ContentProvi... > > Peli > > On Feb 2, 5:42 pm, Charles Harley <[email protected]> > wrote: > > > I am performing hundreds of calls to a single content provider to > > perform various insertions, updates and deletions. After profiling my > > application, I have noticed that the ContentResolver class takes > > approx. 30ms to retrieve the corresponding content provider object for > > each call. Is there anyway to retrieve a reference to the content > > provider rather then going through the ContentResolver every time? > > > Many thanks, > > > Charles > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

