Open Bug 1304629 Opened 9 years ago Updated 3 years ago

Decide the prioritization in IsSpecialProtocol for performance

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

People

(Reporter: CuveeHsu, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf, Whiteboard: [necko-backlog])

IsSpecialProtocol isn't expensive but it's easy to prioritize that which protocol we want it faster. It takes 0.1 micro sec for each comparison |protocol.LowerCaseEqualsLiteral(PROTOCOL_NAME)|.
Originally I guess HTTPS should deserve more respect than HTTP, and get more user. However, HTTPS only have 3X% according [1] [1] http://httparchive.org/trends.php#perHttps
if that's worth optimizing build a state machine and walk the string (i.e. that thing should be 6 char compares at most instead of a linear string walk followed by up to 7 string compares and a string copy! the name isSpecialProtocol should also be changed to isSpecialScheme for accuracy.
Whiteboard: [necko-active] → [necko-backlog]
Priority: -- → P1
Priority: P1 → P3
Assignee: juhsu → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.