Closed
Bug 686706
Opened 13 years ago
Closed 11 years ago
Don't fsync when initializing nsDownloadManager
Categories
(Toolkit :: Downloads API, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: Yoric, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: perf)
Attachments
(1 file, 2 obsolete files)
1.17 KB,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20100101 Firefox/6.0.2 Build ID: 20110902133214 Actual results: At startup, nsDownloadManager uses sqlite in synchronous mode, which causes useless fsync when creating an empty database. Expected results: Remove the fsync.
Reporter | ||
Updated•13 years ago
|
Reporter | ||
Comment 1•13 years ago
|
||
Reporter | ||
Comment 2•13 years ago
|
||
Attachment #560201 -
Attachment is obsolete: true
Updated•13 years ago
|
Component: General → Download Manager
Product: Firefox → Toolkit
QA Contact: general → download.manager
Comment 3•13 years ago
|
||
What happens if you crash then?
Reporter | ||
Comment 4•13 years ago
|
||
Good point. I am just starting my review on startup I/O but currently, I have the impression that all sorts of things can go wrong if we crash at startup and that transacting nsDownloadManager init will not help.
Comment 5•13 years ago
|
||
The right fix here is to make all the download manager APIs async. That's a lot of work, though. If that is undertaken, it may be worthwhile to look into implementing the download manager on top of Places (since almost all the data we care about is already stored there) instead of having its own database.
Reporter | ||
Comment 6•13 years ago
|
||
Taking a look at sqlite async I/O (http://www.sqlite.org/asyncvfs.html). At first glance, it seems to take the simple way towards async I/O: put all the I/O in a distinct thread. We could certainly use this, or, better, have a startup thread for all such startup I/O. I'll try working on the second option.
Comment 7•13 years ago
|
||
No, we don't want to use SQLite's async I/O. It throws away durability in ACID. We have written our own async I/O for SQLite (see `executeAsync` on `mozIStorageStatement` and `mozIStorageConnection`).
Reporter | ||
Comment 8•13 years ago
|
||
First (well, second) draft of a mechanism that could possibly help with async initialization: https://wiki.mozilla.org/User:Yoric/RunLevelQueue .
Reporter | ||
Comment 9•13 years ago
|
||
Attachment #560204 -
Attachment is obsolete: true
Updated•13 years ago
|
Attachment #561692 -
Attachment is patch: true
Comment 10•13 years ago
|
||
Does the patch need a review or it's still a work in progress?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 11•13 years ago
|
||
It is a work in progress.
Reporter | ||
Comment 12•11 years ago
|
||
Paolo, will bug 825588 et al. help here?
Flags: needinfo?(paolo.mozmail)
Comment 13•11 years ago
|
||
(In reply to David Rajchenbach Teller [:Yoric] from comment #12) > Paolo, will bug 825588 et al. help here? Definitely, that's more or less the "lot of work" mentioned in comment 5 :-)
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(paolo.mozmail)
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•