Closed
Bug 600301
Opened 15 years ago
Closed 15 years ago
Optimize ReplacePrep
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: smaug, Assigned: smaug)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
2.82 KB,
patch
|
benjamin
:
review+
benjamin
:
approval2.0+
|
Details | Diff | Splinter Review |
This should also optimize out some MutatePrep calls.
Patch coming soon.
Assignee | ||
Comment 1•15 years ago
|
||
This is one way to speed up append/assign.
Speeds up GetInnerHTML 5-10% where append is called a lot.
I pushed the patch to tryserver.
Attachment #479154 -
Flags: review?
Assignee | ||
Updated•15 years ago
|
Attachment #479154 -
Flags: review? → review?(benjamin)
Assignee | ||
Comment 2•15 years ago
|
||
Benjamin, any chance for a review?
I'm hoping to get this to FF4 as a part of other optimization patches.
Comment 3•15 years ago
|
||
Comment on attachment 479154 [details] [diff] [review]
v1
Does ReplacePrep actually get inlined in this case? That seems like a fair bit of code to get inlined...
Attachment #479154 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 4•15 years ago
|
||
ReplacePrep is not used in too many places.
Assignee | ||
Updated•15 years ago
|
Attachment #479154 -
Flags: approval2.0?
Updated•15 years ago
|
Attachment #479154 -
Flags: approval2.0? → approval2.0+
Comment 5•15 years ago
|
||
How can you be sure that it's safe to mutate the given string in place?
Assignee | ||
Comment 6•15 years ago
|
||
Neil, I don't understand what you mean.
Assignee | ||
Comment 7•15 years ago
|
||
Neil, I tried to keep the behavior of ReplacePrep and MutatePrep.
Is there some case I missed?
Comment 8•15 years ago
|
||
Comment on attachment 479154 [details] [diff] [review]
v1
>+ if (cutStart == mLength && Capacity() > newTotalLen) {
OK, so I worked that last one out. But perhaps you could have checked for cutStart + cutLength == mLength, like ReplacePrep does, thus allowing you to remove the check in ReplacePrep?
Assignee | ||
Comment 9•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: String → XPCOM
You need to log in
before you can comment on or make changes to this bug.
Description
•