Closed
Bug 600257
Opened 14 years ago
Closed 14 years ago
Only flush when really needed in content lists
Categories
(Core :: DOM: Core & HTML, defect, P1)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla5
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
(Blocks 1 open bug)
Details
(Keywords: perf)
Attachments
(2 files)
481 bytes,
text/html
|
Details | |
4.66 KB,
patch
|
peterv
:
review+
bzbarsky
:
approval2.0-
|
Details | Diff | Splinter Review |
Since the HTML5 parser doesn't leave the DOM in an inconsistent state, we no longer need content flushes in HTML documents. We still need them in XML for now, sadly, but we can optimize away the HTML ones pretty well.
On the attached microbenchmark, I see these numbers (for a bunch of .length gets before/after onload):
Opera: 1800 1650
Chrome 7 dev: 642 523
Safari 5: 240 241
Trunk (Mac 64-bit): 650 270
Trunk with upcoming patch: 229 239
Assignee | ||
Comment 1•14 years ago
|
||
Assignee | ||
Updated•14 years ago
|
Attachment #479094 -
Flags: review?(peterv)
Comment 2•14 years ago
|
||
What happens if the owner of nsChildContentList is moved to another document
(from HTML to XML document), or just added to document (so that GetCurrentDoc returns non-null)?
Assignee | ||
Comment 3•14 years ago
|
||
This only matters for cases when the element in question is on the parser's open-tag stack and actively being parsed into. The behavior of moving such elements between documents is not interoperable across web browsers, so I really doubt sites do that.
Assignee | ||
Updated•14 years ago
|
Whiteboard: [need review]
Updated•14 years ago
|
Attachment #479094 -
Flags: review?(peterv) → review+
Assignee | ||
Updated•14 years ago
|
Whiteboard: [need review] → [need approval]
Assignee | ||
Comment 4•14 years ago
|
||
Comment on attachment 479094 [details] [diff] [review]
. Only flush in content lists if we're in an XML document.
Requesting approval for this simple safe perf win.
Attachment #479094 -
Flags: approval2.0?
Assignee | ||
Updated•14 years ago
|
Whiteboard: [need approval] → [need gk2 ship]
Assignee | ||
Updated•14 years ago
|
Attachment #479094 -
Flags: approval2.0? → approval2.0-
Comment 5•14 years ago
|
||
Whiteboard: [need gk2 ship] → [need gk2 ship][fixed-in-cedar]
Assignee | ||
Updated•14 years ago
|
Whiteboard: [need gk2 ship][fixed-in-cedar] → [fixed-in-cedar]
Comment 6•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-cedar]
Target Milestone: --- → mozilla2.2
Assignee | ||
Updated•14 years ago
|
Flags: in-testsuite-
Depends on: 645938
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•