fb5a4964b8d402b39754f406dd2255035ff2148d |
|
15-Mar-2012 |
Jeff Brown <jeffbrown@google.com> |
Prefetch column names in bulk cursor adaptor. If the remote end of a bulk cursor died, then it was possible for getColumnNames() to return null, violating the invariant that it never returns null. As a result, the application could crash in strange ways due to an NPE. Since we are often interested in the column names anyhow, prefetch them when setting up the bulk cursor adaptor. This way, a remote cursor will never return null even if the remote end died. It is possible for an application to continue to use a remote cursor even after the provider has died unless it needs to requery it for some reason. Of course at that point, bad things will happen... but usually the app is better prepared for it than if it just randomly encounters a null array of column names. This change also optimizes the bulk cursor adaptor to return the initial cursor window back to the client, potentially saving an extra RPC. Because the communication protocol between the CursorToBulkCursorAdaptor and BulkCursorToCursorAdaptor was getting a little hard to follow, introduced a new type called BulkCursorDescriptor to hold all of the necessary parameters. Deleted several unnecessary IBulkCursor methods that are never actually called remotely. Bug: 6168809 Change-Id: I9aaf6f067c6434a575e2fdbf678243d5ad10755f
/frameworks/base/core/java/android/database/IBulkCursor.java
|
650de3dcfcbc7635da3c070410ef1dc4027ae464 |
|
27-Oct-2011 |
Jeff Brown <jeffbrown@google.com> |
Optimize fillWindow to improve reverse-seek performance. Bug: 5520301 When an application requests a row from a SQLiteCursor that is not in the window, instead of filling from the requested row position onwards, fill from a little bit ahead of the requested row position. This fixes a problem with applications that seek backwards in large cursor windows. Previously the application could end up refilling the window every time it moved back one position. We try to fill about 1/3 before the requested position and 2/3 after which substantially improves scrolling responsiveness when the list is bound to a data set that does not fit entirely within one cursor window. Change-Id: I168ff1d3aed1a41ac96267be34a026c108590e52
/frameworks/base/core/java/android/database/IBulkCursor.java
|
0cde89f5f025b7826be009ebb9673b970e180e32 |
|
10-Oct-2011 |
Jeff Brown <jeffbrown@google.com> |
Use ashmem for CursorWindows. Bug: 5332296 The memory dealer introduces additional delays for reclaiming the memory owned by CursorWindows because the Binder object must be finalized. Using ashmem instead gives CursorWindow more direct control over the lifetime of the shared memory region. The provider now allocates the CursorWindows and returns them to clients with a read-only protection bit set on the ashmem region. Improved the encapsulation of CursorWindow. Callers shouldn't need to care about details like how string fields are allocated. Removed the compile-time configuration of string and numeric storage modes to remove some dead weight. Change-Id: I07c2bc2a9c573d7e435dcaecd269d25ea9807acd
/frameworks/base/core/java/android/database/IBulkCursor.java
|
7cd51efcbd2d083bf577696591ef1769034f7e2f |
|
13-May-2010 |
Jeff Hamilton <jham@android.com> |
Remove the deprecated cursor methods. Change-Id: Ie3571fea9f36996c31c327240b11086f8cc487f0
/frameworks/base/core/java/android/database/IBulkCursor.java
|
9ffdfa0c238fce3b85741d7f6828fd484cd8f195 |
|
09-Mar-2010 |
Brad Fitzpatrick <bradfitz@android.com> |
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
/frameworks/base/core/java/android/database/IBulkCursor.java
|
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/database/IBulkCursor.java
|
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/database/IBulkCursor.java
|
54b6cfa9a9e5b861a9930af873580d6dc20f773c |
|
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
/frameworks/base/core/java/android/database/IBulkCursor.java
|