Closed
Bug 77586
Opened 25 years ago
Closed 16 years ago
nsTextFragment::SetTo() optimizations
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
DUPLICATE
of bug 566942
People
(Reporter: waterson, Unassigned)
Details
(Keywords: perf)
nsTextFramgment::SetTo() may benefit from the following optimizations. (Sorry,
haven't measured how much time is spent here; cf. bug 77540.)
- we scan the entire string once to determine if we need to use a
double-byte buffer. (Which sorta means that we're going to end up
in a worst-case situation, since most web pages are probably 7-bit
ASCII.)
- Since we've probably scanned the string two or three times
by this point, the caller could probably pass this information
in.
- Or, if we can't do that, then maybe we could optimisitcally
allocate a single-byte buffer and start copying, and then
fault and restart if it ends up being double-byte.
- Or, pessimistically allocate a double-byte buffer and realloc()
it to a smaller size if we get lucky and end up with a single-byte
string?
- Why do we need our own implementation of memcpy() in SetTo()? Why
not use the one provided with the standard library, as it's likely to
be hand-optimized.
Updated•25 years ago
|
Target Milestone: --- → mozilla1.0
Comment 1•24 years ago
|
||
I think time spend in SetTo is minor, like 0.05sec out ot 120sec for long pages.
Measured with sun's gprof
Updated•24 years ago
|
QA Contact: lchiang → stummala
Comment 2•24 years ago
|
||
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1
(you can query for this string to delete spam or retrieve the list of bugs I've
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
Updated•24 years ago
|
Priority: -- → P3
Updated•23 years ago
|
Target Milestone: mozilla1.0.1 → ---
Updated•17 years ago
|
Assignee: general → nobody
QA Contact: stummala → general
Updated•16 years ago
|
Status: NEW → RESOLVED
Closed: 16 years ago
Component: DOM: Abstract Schemas → DOM
Resolution: --- → DUPLICATE
| Assignee | ||
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•