Closed
Bug 267532
Opened 20 years ago
Closed 20 years ago
Excessive calls to IsDBCSLeadByte from net_CoalesceDirs?
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.8beta1
People
(Reporter: darin.moz, Assigned: darin.moz)
References
()
Details
(Keywords: perf)
Attachments
(1 file)
|
3.44 KB,
patch
|
andreas.otte
:
review+
bryner
:
superreview+
|
Details | Diff | Splinter Review |
Excessive calls to IsDBCSLeadByte from net_CoalesceDirs? It looks like all callers of net_CoalesceDirs may be passing UTF-8 strings, which means that the IsDBCSLeadByte calls made by that function may be unnecessary. bryner has found that these calls show up on Quantify results indicating that there might be a significant performance win if we can remove them. I suspect that IsDBCSLeadByte might be leftover from when we used to pass platform specific multi-byte strings through nsIURI. we need to verify that we are indeed only ever passing UTF-8 (or ASCII) to net_CoalesceDirs, and then remove it. NOTE: if we ever unescape strings before passing them to this function, then my assertion would be false.
| Assignee | ||
Updated•20 years ago
|
Comment 1•20 years ago
|
||
I agree, this is most likely a leftover from old times. However we also most likely feed already unescaped strings to net_CoalesceDirs, some stuff in malinews comes to mind. That code might be broken because of that, but I once tried to fix some of that and broke the rules-stuff in mailnews in the process because storage of the rules depended on those broken escape-unescape sequences. Bottom line: Those instances will be hard to find and even harder to fix ...
Updated•20 years ago
|
| Assignee | ||
Comment 2•20 years ago
|
||
| Assignee | ||
Comment 3•20 years ago
|
||
In nsStandardURL::Resolve & BuildNormalizedSpec, calling net_CoalesceDirs is one of the very last things that we do before returning the result to the caller. In fact, in those cases the buffer is already UTF-8 (or ASCII), so I don't think we can safely remove this IsDBCSLeadByte check.
Status: NEW → ASSIGNED
Target Milestone: Future → mozilla1.8beta
| Assignee | ||
Updated•20 years ago
|
Attachment #164485 -
Flags: superreview?(bryner)
Attachment #164485 -
Flags: review?(andreas.otte)
| Assignee | ||
Comment 4•20 years ago
|
||
> so I don't think we can safely remove this IsDBCSLeadByte check.
I meant: "so I _do_ think we can ..."
Sorry about that! ;-)
Updated•20 years ago
|
Attachment #164485 -
Flags: superreview?(bryner) → superreview+
Updated•20 years ago
|
Attachment #164485 -
Flags: review?(andreas.otte) → review+
Updated•20 years ago
|
Keywords: helpwanted
| Assignee | ||
Comment 5•20 years ago
|
||
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•