Closed Bug 1429989 Opened 4 years ago Closed 4 years ago
.select _popup _in _content .enabled should be cached in a bool variable rather than query every time when used
The usual way to add a layout pref is to add a new static method in nsLayoutUtils and use Preferences::AddBoolVarCache to cache it. But currently, the pref dom.select_popup_in_content.enabled is checked with Preferences::GetBool every time when it is used, which feels wasteful, since the latter would cause hashtable lookup on pref table. It should generally be avoided in performance sensitive code. (The popup constructing code may not be that hot, but it is still good to follow the usual practice rather than using something could be slower.)
Looks like the patch in bug 1428297 is already doing this.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1428297
You need to log in before you can comment on or make changes to this bug.