summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/ProgramVertex.java
diff options
context:
space:
mode:
authorVasu Nori <vnori@google.com>2010-08-12 18:16:35 -0700
committerVasu Nori <vnori@google.com>2010-09-10 13:43:19 -0700
commitb18f27dbf43ee9028a11cafbca23d3fa318e278b (patch)
tree9352b40d10960502001dcb324e8d4fefb2c73ae3 /graphics/java/android/renderscript/ProgramVertex.java
parenta78eca95ff54989c280405b70d143b0909854409 (diff)
Return count of rows in a resultset only once (when startPos = 0)
If a query returns 100 rows and say only 10 rows fit in 1MB, then client receiving the cursor from the ContentProvider needs to paginate. ContentProvider returns count of total data everytime it returns a page (= 1MB) of data to the client. Returning total count causes reading (and skipping unwanted) data from sqlite. Instead, it should be sufficient to get total count once and re-use the count value during the life of the cursor until a requery is performed on the cursor. (Count won't change unless data is changed - in which case the cursor is asked to perform requery anyway. So doing count once and reusing it should work) Change-Id: I3520d94524dda07be9bcff56b6fbae5276af1d3b
Diffstat (limited to 'graphics/java/android/renderscript/ProgramVertex.java')
0 files changed, 0 insertions, 0 deletions