Closed
Bug 1373095
Opened 7 years ago
Closed 7 years ago
nsTableCellFrame::GetRowSpan() is a tad slow
Categories
(Core :: Layout: Tables, enhancement, P3)
Core
Layout: Tables
Tracking
()
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
References
(Blocks 1 open bug)
Details
(Keywords: perf)
Attachments
(1 file)
10.91 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
It's at ~1.5% on the perf log for the Netflix use case reported in bug 1373058, which seems a bit too much. GetRowSpan/GetColSpan are virtual because nsMathMLmtdFrame overrides it. http://searchfox.org/mozilla-central/rev/c49a70b53f67dd5550eec8a08793805f2aca8d42/layout/mathml/nsMathMLmtableFrame.cpp#1170 It seems we could devirtualize these fairly easily, by adding that code in an else-branch in the base class: http://searchfox.org/mozilla-central/rev/c49a70b53f67dd5550eec8a08793805f2aca8d42/layout/tables/nsTableCellFrame.cpp#712 Or perhaps hookup <mtd> so that it parses the attr like <td>: http://searchfox.org/mozilla-central/rev/c49a70b53f67dd5550eec8a08793805f2aca8d42/dom/html/HTMLTableCellElement.cpp#404 so that the existing code in nsTableCellFrame just works as is.
Updated•7 years ago
|
Whiteboard: [qf] → [qf:p3]
Assignee | ||
Comment 1•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=46174017a113acd4229393fbc91cc5894f635fd4
Assignee: nobody → mats
Assignee | ||
Comment 2•7 years ago
|
||
FYI, I intentionally skipped this HTML quirk: http://searchfox.org/mozilla-central/rev/20d16dadd336e0c6b97e3e19dc4ff907744b5734/dom/html/HTMLTableCellElement.cpp#406-408 since we currently don't do that for MathML <mtd>. Let me know if you think we should.
Attachment #8878496 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•7 years ago
|
Blocks: FastReflows
Comment 3•7 years ago
|
||
Comment on attachment 8878496 [details] [diff] [review] Devirtualize GetRowSpan/GetColSpan >+ if (IsMathMLElement(nsGkAtoms::mtd_)) { No point testing the namespace again, given where we are. Just use: if (mNodeInfo->Equals(nsGkAtoms::mtd_)) { r=me
Attachment #8878496 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 4•7 years ago
|
||
Ah, good point. I'll update the other three places likewise then: http://searchfox.org/mozilla-central/rev/20d16dadd336e0c6b97e3e19dc4ff907744b5734/dom/mathml/nsMathMLElement.cpp#150,239,242
Pushed by mpalmgren@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/c0bb73483afb Devirtualize GetRowSpan/GetColSpan. r=bz
Comment 6•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c0bb73483afb
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Updated•2 years ago
|
Performance Impact: --- → P3
Whiteboard: [qf:p3]
You need to log in
before you can comment on or make changes to this bug.
Description
•