Closed
Bug 826476
Opened 11 years ago
Closed 11 years ago
Modify sqlite database pragmas to possibly improve performance
Categories
(Firefox for Android Graveyard :: Data Providers, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 22
People
(Reporter: mfinkle, Assigned: mfinkle)
Details
Attachments
(1 file, 1 obsolete file)
3.76 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
We currently use our subclass of SQLiteOpenHelper.onOpen to tweak some sqlite pragmas, originally done in bug 721320. Some notes: 1. We treat the "PRAGMA synchronous" as mutually exclusive with support for enableWriteAheadLogging, but sqlite doesn't. We should always set "PRAGMA synchronous". Desktop Firefox also does this. 2. tabs.db is not a long-lived durable DB. We refresh the entire DB every time we update it. I think we can get away with less safety and get better performance. The patch uses "PRAGMA synchronous=OFF" and "PRAGMA read_uncommitted=true" to get better performance. I think we should consider using "PRAGMA read_uncommitted=true" for browser.db too, but we need some testing first. PRAGMA details here: http://www.sqlite.org/pragma.html Note: For the Gecko sqlite usage, we use "PRAGMA synchronous=OFF" for all DB access: http://mxr.mozilla.org/mozilla-central/source/mobile/android/app/mobile.js#42 http://mxr.mozilla.org/mozilla-central/source/storage/src/mozStorageConnection.cpp#626
Attachment #697662 -
Flags: feedback?(bugmail.mozilla)
Comment 1•11 years ago
|
||
Comment on attachment 697662 [details] [diff] [review] WIP Review of attachment 697662 [details] [diff] [review]: ----------------------------------------------------------------- I don't see any problems with this, but wondering why you set the read_uncommitted pragma to true. Do you expect that to be significantly faster?
Attachment #697662 -
Flags: feedback?(bugmail.mozilla) → feedback+
Assignee | ||
Comment 2•11 years ago
|
||
I'm ready to try this on Nightly. I removed the "read_uncommitted" pragma. I expected some improvement from this, but the Tabs DB is too small to see much difference. No sense in adding it.
Assignee: nobody → mark.finkle
Attachment #697662 -
Attachment is obsolete: true
Attachment #699801 -
Flags: review?(bugmail.mozilla)
Comment 3•11 years ago
|
||
Comment on attachment 699801 [details] [diff] [review] patch Review of attachment 699801 [details] [diff] [review]: ----------------------------------------------------------------- Do we have appropriate telemetry in place to track if this helps?
Attachment #699801 -
Flags: review?(bugmail.mozilla) → review+
Assignee | ||
Comment 4•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/018998c48bbe
Comment 5•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/018998c48bbe
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•