Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: PerformanceTests/Layout/line-layout-line-height.html

Issue 256593009: Create a baseline RenderBlock::lineHeight() performance (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PerformanceTests/Layout/line-layout-line-height.html
diff --git a/PerformanceTests/Layout/line-layout-line-height.html b/PerformanceTests/Layout/line-layout-line-height.html
new file mode 100644
index 0000000000000000000000000000000000000000..cd9f9695bdfee55512f6f18ec5354822ea944888
--- /dev/null
+++ b/PerformanceTests/Layout/line-layout-line-height.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Line height calculation performance test</title>
Julien - ping for review 2014/04/28 20:11:38 Can't we dump this into the test or would this imp
+ <script src="../resources/runner.js"></script>
+</head>
+<body>
+ <pre id="log"></pre>
+ <div id="target" style="width: 300px; display: none;">
+ </div>
+ <script>
+ var target = document.getElementById("target");
+ var style = target.style;
+ var rows = 10000;
Julien - ping for review 2014/04/28 20:11:38 s/rows/lines/?
+ var el = document.createElement('p');
+ el.innerHTML = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ut elit lacus, non convallis odio. Integer facilisis, dolor quis porttitor auctor\n';
+ for (var i = 0; i < rows; ++i) {
+ var e = el.cloneNode(true);
+ target.appendChild(e);
+ }
+ function test() {
+ style.display = "block";
Julien - ping for review 2014/04/28 20:11:38 FWIW you are also checking the attachment / detach
+ style.width = "280px";
+ target.offsetLeft;
+ style.width = "300px";
+ target.offsetLeft;
+ style.width = "290px";
+ target.offsetLeft;
+ style.display = "none";
+ }
+
+ PerfTestRunner.measureTime({ run: test });
Julien - ping for review 2014/04/28 20:11:38 I think it's preferred to measure runs per seconds
+ </script>
+</body>
+</html>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698