Closed
Bug 1429989
Opened 6 years ago
Closed 6 years ago
dom.select_popup_in_content.enabled should be cached in a bool variable rather than query every time when used
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
RESOLVED
DUPLICATE
of bug 1428297
Tracking | Status | |
---|---|---|
firefox59 | --- | affected |
People
(Reporter: xidorn, Unassigned)
References
Details
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.)
Reporter | ||
Comment 1•6 years ago
|
||
Looks like the patch in bug 1428297 is already doing this.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•