Bug 119026
Summary: | Table DOM mutation methods (insertRow, insertCell) should lazy attach | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | ahmad.saleem792, bdakin, dino, kling, koivisto, robert, simon.fraser |
Priority: | P2 | Keywords: | BlinkMergeCandidate |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Ryosuke Niwa
Consider merging https://chromium.googlesource.com/chromium/blink/+/74ae9c918ea8b6b1a41871b826ec3f2a5737061c
Doing thead.insertRow, table.insertRow or tr.insertCell would sync attach, this
changes them to do lazyAttach just like doing appendChild() or insertBefore()
would have.
In a basic benchmark:
table.offsetTop;
var t = Date.now();
for (var i = 0; i < 200; i++) {
var row = table.insertRow(0);
for (var j = 0; j < 200; j++)
row.insertCell(0).textContent = "foo bar";
}
table.offsetTop;
document.body.textContent = Date.now() - t;
This cuts the time from 840ms down to 550ms for a 35% speed improvement.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
lazyAttach is not something in Webkit. So marking this as "RESOLVED WONTFIX".