Closed Bug 1287945 Opened 8 years ago Closed 8 years ago

Use the size of the filled modified preferences array

Categories

(Core :: Preferences: Backend, defect)

Unspecified
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: milan, Assigned: milan)

References

Details

Attachments

(1 file, 1 obsolete file)

pref_savePrefs allocates enough entries for all the preferences, nulls all of them out, then fills in the modified preferences.  We don't use the number of modified preferences for subsequent operations, but instead use the total number of them.

Changes extracted from bug 789945.
Assignee: nobody → milan
Version: 38 Branch → Trunk
I don't know if this would introduce measurable performance improvement, as all we save is quicksort time and an extra if in the loop, but, my profile, for example, has ~200 out of 3000 preferences being saved, so that quick sort and loop are operating on 15x as much data.  I'm sure the cost is dwarfed by actually writing things to disk, but still :)
Attachment #8772598 - Flags: review?(aklotz) → review+
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/edf44ee4f4ad
Return the number of modified/filled preferences and use it for subsequent operations. r=aklotz
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/edf44ee4f4ad
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: