I firmly subscribe to the KISS principle. Just do your query on the UI thread and if there is a performance issue, think about a more complicated solution. SQLite is suprisingly fast, and In my app, on my Nexus One, even the most complicated queries don't take more than a second to execute, so I haven't bothered moving any of them out of the UI thread. And I haven't had a single complaint about the perfomance of my app yet.
On Sep 21, 8:27 am, goosedroid <[email protected]> wrote: > I'm just getting familiar with the Loader framework, but they seem > geared for queries where you keep the cursor around, so the Loader can > manage / requery when changes occur to the underlying Uri. > > But what about those queries that are one-shot type things, where you > need the data in the cursor for some reason, and then just want to > close it right away? > > I guess I could do something like this in > LoaderManager.LoaderCallbacks.onLoadFinished(Loader<D> loader, D data) > > { > ... get required data out of cursor > getLoaderManager().destroyLoader(loader.getId()); > > } > > This seems kinda heavy though in situations where i expect to be doing > many of these kinds of queries. I would expect a bunch of bookkeeping > to get updated, as well as GC activity too. > > Should I keep using AsyncQueryHandler for this scenario? -- 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

