Skip to content

Commit

Permalink
Multicol performance tests for tall content (so that we get (very) ma…
Browse files Browse the repository at this point in the history
…ny columns).

This is currently horribly slow. Discovered while working on bug 502407
(assertion failure). It seems impossible to write a test for that issue
that doesn't run into the performance problems illustrated by these tests,
so we have to land some performance improvements before fixing the actual
assertion. 

R=dsinclair@chromium.org

Review URL: https://codereview.chromium.org/1239783002

git-svn-id: svn://svn.chromium.org/blink/trunk@198956 bbb929c8-8fbe-4397-9dbb-9b2b20218538
  • Loading branch information
mstensho@opera.com committed Jul 15, 2015
1 parent bb22fcd commit 480a977
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<script src="../../resources/runner.js"></script>
<body style="overflow:scroll;"> <!-- don't want auto scrollbars to affect the number of layout passes. -->
<pre id="log"></pre>
<div id="target" style="position:absolute; top:0; left:0; display:none; -webkit-columns:2; column-fill:auto; width:40em; height:40em;">
<div style="height:1000000px;">xxxxxxxxxx</div>
</div>
<script>
var target = document.getElementById("target");
var style = target.style;

function test() {
style.display = "block";
PerfTestRunner.forceLayoutOrFullFrame();

// Do some hit-testing.
document.caretRangeFromPoint(10, 10);

style.display = "none";
PerfTestRunner.forceLayoutOrFullFrame();
}

PerfTestRunner.measureRunsPerSecond({
description: "Measures performance of multicol layout with many columns.",
run: test
});
</script>
</body>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<script src="../../resources/runner.js"></script>
<body style="overflow:scroll;"> <!-- don't want auto scrollbars to affect the number of layout passes. -->
<pre id="log"></pre>
<div id="target" style="position:absolute; top:0; left:0; display:none; -webkit-columns:2; column-fill:auto; width:40em; height:2em;">
<div style="height:1234567890px;">xxxxxxxxxx</div>
</div>
<script>
var target = document.getElementById("target");
var style = target.style;

function test() {
style.display = "block";
PerfTestRunner.forceLayoutOrFullFrame();

// Do some hit-testing.
document.caretRangeFromPoint(10, 10);

style.display = "none";
PerfTestRunner.forceLayoutOrFullFrame();
}

PerfTestRunner.measureRunsPerSecond({
description: "Measures performance of multicol layout with many columns.",
run: test
});
</script>
</body>

0 comments on commit 480a977

Please sign in to comment.