Closed Bug 1429989 Opened 4 years ago Closed 4 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)

defect
Not set
normal

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.)
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.