Closed
Bug 875971
Opened 10 years ago
Closed 5 years ago
Main thread SQLite: PRAGMA cache_size = -2048
Categories
(Toolkit :: Storage, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 885732
People
(Reporter: taras.mozilla, Unassigned)
References
(Depends on 1 open bug)
Details
(Whiteboard: [snappy:p1])
please don't execute sql queries synchronously.
Reporter | ||
Comment 1•10 years ago
|
||
This creeped up into top ~20 slow main thread sql usages according to telemetry.
Comment 2•10 years ago
|
||
FHR uses Sqlite.jsm which executes *everything* (except connection open and close because there are no off-main-thread APIs for that) off the main thread. There is no statement execution API in Sqlite.jsm that is supposed to execute on the main thread. This is either misidentification of main thread I/O or Sqlite.jsm/Storage is misbehaving. Either way, not a FHR bug. https://hg.mozilla.org/mozilla-central/file/7a2f7a45819a/services/metrics/storage.jsm#l1115 https://hg.mozilla.org/mozilla-central/file/7a2f7a45819a/toolkit/modules/Sqlite.jsm#l454 https://hg.mozilla.org/mozilla-central/file/7a2f7a45819a/toolkit/modules/Sqlite.jsm#l767 I'm on holiday. Someone else will have to dig into this.
Reporter | ||
Comment 3•10 years ago
|
||
Looks like it's due to main thread io in open() :( http://dxr.mozilla.org/mozilla-central/storage/src/mozStorageConnection.cpp#l581 David/mak, when are we getting a proper async open?
Comment 4•10 years ago
|
||
Yeah, it's in open(). Async open is waiting for review (see bug 702559).
Updated•10 years ago
|
Component: Client: Desktop → Storage
Product: Firefox Health Report → Toolkit
Comment 6•10 years ago
|
||
fwiw, the only thing we can do here is convert consumers from sync to async, it's pretty clear we can't avoid main-thread queries for a synchronous consumer.
Depends on: AsyncConnConversion
Updated•5 years ago
|
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•