Open Bug 1165121 Opened 8 years ago Updated 3 years ago

Investigate/improve performance of permissions DB after bug 1157950


(Core :: Permission Manager, defect, P3)




Tracking Status
firefox41 --- affected


(Reporter: jld, Unassigned)



(Whiteboard: [necko-backlog])

(In reply to Ben Turner [:bent] from bug 1157950 comment #15)
> Yeah, I say we just file a followup for making these dbs use WAL, and just
> remove the SYNCHRONOUS=OFF from everything.

This is that followup.  Things to do:

1. Watch the “other threads” section of for anything from permissions.sqlite; that's where permissions updates will show up.  There are also a few permissions.sqlite queries already in the “main thread” section, apparently all on startup, and we probably also care if those get worse.  (One of them, the timed permission expiry check, looks like it could be improved with an index independently of this.)

2. Consider using `PRAGMA journal_mode = WAL`.  This could improve performance on its own (see notes on about sequentiality of I/O), and it can be used with `PRAGMA synchronous = NORMAL` which gives up the durability that we don't care about anyway — nsPermissionManager already runs permission updates asynchronously and doesn't wait for completion — for more possible improvement.

2.1. Documenting that lack of durability in the XPIDL would be nice (and, if we're not fsync()ing, also mentioning that there could be a relatively long window before permission changes become persistent).  Given that the authors/reviewers of Webapps.jsm seem to have not expected that failure mode, that suggests the need for a warning.
See Also: → 1165165
Whiteboard: [necko-backlog]
Bulk change to priority:
Priority: -- → P1
Bulk change to priority:
Priority: P1 → P3
Component: Networking: Cookies → Permission Manager
You need to log in before you can comment on or make changes to this bug.