Closed
Bug 1382817
Opened 7 years ago
Closed 7 years ago
Prefs shouldn't start out dirty or be written out immediately
Categories
(Core :: Preferences: Backend, enhancement)
Core
Preferences: Backend
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: benjamin, Assigned: benjamin)
References
Details
Attachments
(1 file)
The prefapi dirty callback is called when we read in user prefs, which causes us to do at least one extra write (it looks like more!). This is fairly easy to fix.
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8888517 [details] Bug 1382817 - Prefs shouldn't start out dirty or be written almost immediately after being read, https://reviewboard.mozilla.org/r/159498/#review165166 We do have a scenario (pre this patch) where mSavePending is false, though there is a runnable in the delayed queue. This in the scenario where the caller changes a pref, then calls SavePrefFile explicitly. That should be OK, unless the caller repeatedly changes different preferences and calls SavePrefFile after each change. In other words, the value of mSavePending is only relevant if DirtyCallback shows up during that delay.
Attachment #8888517 -
Flags: review?(milan) → review+
Assignee | ||
Comment 3•7 years ago
|
||
Yes that's true: mSavePending is an optimization to avoid dispatching the event over and over again.
Pushed by bsmedberg@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/601d05280d9e Prefs shouldn't start out dirty or be written almost immediately after being read, r=milan
Comment 5•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/601d05280d9e
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•