Closed Bug 1352525 Opened 8 years ago Closed 8 years ago

Investigate which prefs are read over and over that could benefit from an observer or caching

Categories

(Core :: General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Felipe, Assigned: Felipe)

References

Details

Attachments

(4 files)

Many prefs are read many times over and they never change value, or very rarely. A pref read implies in a string hash lookup so maybe the biggest offenders would provide value to be cached. I'm not planning on landing code in the tree for this, just adding debugging locally and using a custom build for a while to get this data. I've got something barebones working for this
Attached file most-read-prefs.txt
Ok, here's a sorted list of the most repeatedly-read prefs in a 5min session on my profile, doing some light browsing. All these prefs always returned the same value and never changed. I think at least some of these would be nice improvements, specially layout.css.devPixelsPerPx and the urlclassifier.* ones since the urlclassifier blocks the network channel (and those are char prefs which implies in string copies). Feel free to file bugs for these as you see fit.
Attached file most-bytes-read.txt
And by bytes read, from the char prefs
Patch used to log this info
Attached file script.js
Script used to parse the data and generate the summaries
Alright, my work here is done! Feel free to file bugs for things that are deemed worth it.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Depends on: 1353493
Depends on: 1353853
Thank you *so much* for doing this, Felipe!
Depends on: 1355548
Depends on: 1355631
I went through the list and file some more bugs. The rest don't look they are on the hot path so I will leave them as is.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: