Speed up ContentProvider.query() in simple case by ~30%
When query() uses bulkQuery() and we know we're going to need some metadata right afterwards (number of rows and column index of _id, if present), just asked for it in the initial binder transaction instead of immediately fetching it again. Also, this defers loading column names until the client asks for them. This gets down the simpler (and very common) use cases of ContentProvider.query() down to 3 binder calls: QUERY_TRANSACTION to android.content.ContentProvider$Transport GET_CURSOR_WINDOW_TRANSACTION to android.database.CursorToBulkCursorAdaptor CLOSE_TRANSACTION to android.database.CursorToBulkCursorAdaptor More can still be done, but this is a good bite-sized first piece. Change-Id: I7ad45949f53e0097ff18c2478d659f0f36929693
Loading
Please register or sign in to comment