Closed
Bug 1362806
Opened 8 years ago
Closed 8 years ago
Optimize NS_GetDefaultPort() for HTTP(S)
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla55
| Tracking | Status | |
|---|---|---|
| firefox55 | --- | fixed |
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file)
|
1.13 KB,
patch
|
mcmanus
:
review+
|
Details | Diff | Splinter Review |
See this perf profile:
- 0.00% Web Content libxul.so [.] imgLoader::LoadImage ▒
- imgLoader::LoadImage ▒
- 2.10% mozilla::net::HttpChannelChild::AsyncOpen2 ▒
+ 1.75% mozilla::net::HttpChannelChild::AsyncOpen ▒
- 0.34% nsContentSecurityManager::doContentSecurityCheck ◆
+ 0.17% NS_CheckContentLoadPolicy ▒
- 0.13% nsContentSecurityManager::CheckChannel ▒
NS_HasBeenCrossOrigin ▒
mozilla::BasePrincipal::CheckMayLoad ▒
- ContentPrincipal::MayLoadInternal ▒
- 0.08% NS_SecurityCompareURIs ▒
- NS_GetRealPort ▒
- 0.05% NS_GetDefaultPort ▒
net_EnsureIOService ▒
mozilla::services::GetIOService ▒
+ 0.04% mozilla::net::nsStandardURL::GetScheme ▒
0.05% nsACString::Finalize ▒
0.05% mozilla::net::LoadInfo::GetExternalContentPolicyType ▒
NS_SecurityCompareURIs()'s cost is totally from NS_GetDefaultPort, which is all XPCOM overhead. :-(
I have a simple patch that optimizes the HTTP/HTTPS case away, I propose we hardcode these two schemes, and stick to XPCOM purity for the rest?
| Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8865156 -
Flags: review?(mcmanus)
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → ehsan
Comment 2•8 years ago
|
||
Comment on attachment 8865156 [details] [diff] [review]
Optimize NS_GetDefaultPort() for HTTP(S)
Review of attachment 8865156 [details] [diff] [review]:
-----------------------------------------------------------------
thanks - we'll take small easy wins.
Attachment #8865156 -
Flags: review?(mcmanus) → review+
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/98d1dd932bc6
Optimize NS_GetDefaultPort() for HTTP(S); r=mcmanus
Comment 4•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 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.
Description
•