-
-
Notifications
You must be signed in to change notification settings - Fork 461
Closed
Labels
BugIssue typeIssue type
Description
Description
In Android select queries return a Cursor, and the query is actually executed when the Cursor is read.
Our instrumentation wraps the query method, which is always fast.
Here is an example of a transaction with a slow query select * from storeitem where first_name regexp '.*.*.*.*1'. The Dao span is correct, but the db.sql.query span is 1ms long, which is wrong. The related profile gives some more insight.
This affects only select queries, as updates don't return a cursor.
We should wrap the cursor with a custom wrapper and override the correct methods.
Some challenges:
getCount()fills the data only the first time, so we should account for thatonMove()is not available inCursor, but only inSQLiteCursor. But we get aCursorand we should return aCursor- accessing private fields in
SQLiteCursorwith reflection failed
Metadata
Metadata
Assignees
Labels
BugIssue typeIssue type
Projects
Status
Done