Reduce the hashtable lookup cost in EnsureGlobalPredictor()

RESOLVED FIXED in Firefox 55

Status

()

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

unspecified
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
EnsureGlobalPredictor() grabs an XPCOM service every time which is unnecessary.  We can save a hashtable lookup here quite easily.
(Assignee)

Comment 1

2 years ago
Created attachment 8858551 [details] [diff] [review]
Reduce the hashtable lookup cost in EnsureGlobalPredictor()
Attachment #8858551 - Flags: review?(hurley)
Comment on attachment 8858551 [details] [diff] [review]
Reduce the hashtable lookup cost in EnsureGlobalPredictor()

Review of attachment 8858551 [details] [diff] [review]:
-----------------------------------------------------------------

Hooray! I've wanted something like this since I first wrote that code, but didn't know StaticRefPtr existed (or maybe it didn't then), and just had the "static ctors are bad!" mantra in my head (which is how we ended up where we are). Thanks!
Attachment #8858551 - Flags: review?(hurley) → review+

Comment 3

2 years ago
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/31f677cd6b27
Reduce the hashtable lookup cost in EnsureGlobalPredictor(); r=nwgh

Comment 4

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/31f677cd6b27
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.