Investigate/improve performance of permissions DB after bug 1157950




Networking: Cookies
3 years ago
6 months ago


(Reporter: jld, Unassigned)



Firefox Tracking Flags

(firefox41 affected)


(Whiteboard: [necko-backlog])



3 years ago
(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.


3 years ago
See Also: → bug 1165165
Whiteboard: [necko-backlog]
You need to log in before you can comment on or make changes to this bug.