Closed Bug 109255 Opened 23 years ago Closed 23 years ago

nsAppendURLEscapedString does too much copying

Categories

(Core :: Networking, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: dbaron, Assigned: darin.moz)

References

Details

The primary caller of nsStdEscape (in xpcom/io/nsEscape.cpp) is nsAppendURLEscapedString, which copies the result of nsStdEscape. That copying (including the construction and destruction of the nsAutoString) seems like about half a percent of the time on jrgm's tests in a profile I just did. If nsStdEscape had a second version, nsStdEscapeAppend, that didn't truncate (and nsStdEscape called nsStdEscapeAppend), then we could save this cost and get rid of nsAppendURLEscapedString. I'm giving this to darin because he's working on URL stuff and may even be doing something like this already. If not, give it back to me and I'll do it -- it's simple.
once my patch for bug 103916 lands, nsAppendURLEscapedString will no longer be needed. also, when the nsStandardURL lands, there won't be very much appending going on. we'll be saving the whole spec along with offsets and lengths to the individual URL parts. so, marking this bug as dependent on bug 103916.
Depends on: 103916
this is now INVALID as of the recent standard url rewrite. nsAppendURLEscapedString is no longer executed.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.