cache some more xpcom services in nshttphandler

RESOLVED FIXED in Firefox 55

Status

()

enhancement
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: mcmanus, Assigned: mcmanus)

Tracking

unspecified
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

(Whiteboard: [necko-active])

Attachments

(1 attachment)

the various flavors of xpcom getService() are actually quite expensive.

There are a few uncached services that are used in very common http channel paths..  (the error ones aren't so important). I have a patch in progress for 4 or 5 of them to be cached in httpHandler.
Assignee: nobody → mcmanus
Whiteboard: [necko-active]
Attachment #8864957 - Flags: review?(daniel)
Attachment #8864957 - Flags: review?(daniel)
Comment on attachment 8864957 [details]
Bug 1362498 - cache some networking mozilla::services

https://reviewboard.mozilla.org/r/136614/#review139804

::: netwerk/base/nsProtocolProxyService.cpp:1212
(Diff revision 6)
>  
>      nsCOMPtr<nsIProxyInfo> pi;
>      bool usePACThread;
>  
> +    // adapt to realtime changes in the system proxy service
> +    if (mProxyConfig == PROXYCONFIG_SYSTEM) {

afaict this is a latent bug where some bits of priv'd chrome change the nsISystemProxySettings service long after init and expected that to be picked up.. our old late binding happened to do it for one value, but would not have worked if it kept being changed.
Attachment #8864957 - Flags: review?(daniel)
Comment on attachment 8864957 [details]
Bug 1362498 - cache some networking mozilla::services

https://reviewboard.mozilla.org/r/136614/#review139868

::: toolkit/components/url-classifier/nsUrlClassifierDBService.cpp:2304
(Diff revision 8)
>      }
>    } else if (!strcmp(aTopic, "quit-application")) {
>      // Tell the update thread to finish as soon as possible.
>      gShuttingDownThread = true;
> -  } else if (!strcmp(aTopic, "profile-before-change")) {
> +  } else if (!strcmp(aTopic, "profile-before-change") ||
> +             !strcmp(aTopic, "xpcom-will-shutdown")) {

this service required application events that aren't sent during xpcshell tests.. that worked before becuase the xpcshell tests never touched this service until the httphandler picked up a reference to it. The double shutdown() here is harmless (and short circuited).
note to self - c1 c2 c3 keep having try troubles with generic timeouts.. maybe related to https://bugzilla.mozilla.org/show_bug.cgi?id=1260312
Comment on attachment 8864957 [details]
Bug 1362498 - cache some networking mozilla::services

https://reviewboard.mozilla.org/r/136614/#review141510

Clean and straight-forward!
Attachment #8864957 - Flags: review?(daniel) → review+
Pushed by mcmanus@ducksong.com:
https://hg.mozilla.org/integration/autoland/rev/89150ec24a6f
cache some networking mozilla::services r=bagder
https://hg.mozilla.org/mozilla-central/rev/89150ec24a6f
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.