Open Bug 559310 Opened 14 years ago Updated 8 months ago

[HTML5] nsHtml5TreeOpExecutor::FlushDocumentWrite() causes lots of nsTArray_base::ShrinkCapacity calls

Categories

(Core :: DOM: HTML Parser, defect, P5)

x86
All
defect

Tracking

()

People

(Reporter: smaug, Unassigned)

References

(Blocks 1 open bug)

Details

This shows up a bit in profiles when setting innerHTML.
Do you have any numbers for "a bit"?
IIRC it was 2-3%. I could re-profile tomorrow.
But it was certainly enough to get noticed.
When the parser transfers tree ops from one queue to another, it tries to use nsTArray::Swap if the target array is empty. If the target array isn't empty, it uses nsTArray::MoveElementsFrom, which uses nsTArray::ShiftData to shift the source arrays elements to emptiness. I guess nsTArray needs to provide an option not to deallocate the backing buffer in that case.
Priority: -- → P3

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

Severity: normal → S4
Priority: P3 → P5
You need to log in before you can comment on or make changes to this bug.