Closed
Bug 267506
Opened 20 years ago
Closed 20 years ago
Reduce string copying from nsGenericHTMLElement::GetHrefURIForAnchors
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
People
(Reporter: bryner, Assigned: bryner)
Details
(Keywords: perf)
Attachments
(1 file)
|
2.20 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
Since this method only needs a const string containing the attribute value, it can use the buffer owned by the nsAttrValue and avoid copy plus (usually) malloc cost. This shows up fairly high on the profile for frame construction time on certain pages, like the netscape.com page on the pageload test. On that page, without this patch, nsStyleUtil::IsHTMLLink takes 42% of time spent in nsCSSFrameConstructor::ConstructFrame. With this patch, it's down to about 15%. (It looks like it hits this page hard because it has a lot of AREA elements).
| Assignee | ||
Comment 1•20 years ago
|
||
In addition to what I said above, this also avoids a bit of buffer refcounting in nsContentUtils::NewURIWithDocumentCharset.
| Assignee | ||
Updated•20 years ago
|
Attachment #164429 -
Flags: superreview?(jst)
Attachment #164429 -
Flags: review?(jst)
Comment 2•20 years ago
|
||
Comment on attachment 164429 [details] [diff] [review] patch r+sr=jst
Attachment #164429 -
Flags: superreview?(jst)
Attachment #164429 -
Flags: superreview+
Attachment #164429 -
Flags: review?(jst)
Attachment #164429 -
Flags: review+
| Assignee | ||
Comment 3•20 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•