From b4a04b3a8065520520438b2cbf4a04bd8497d6f3 Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Wed, 12 Mar 2014 10:21:16 -0700 Subject: [PATCH] loosened the tight restraints table imposes to try and ensure smooth rendering --- src/kibana/directives/table.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/kibana/directives/table.js b/src/kibana/directives/table.js index 6fcb33ef029b2..a6f5d4e058e5d 100644 --- a/src/kibana/directives/table.js +++ b/src/kibana/directives/table.js @@ -114,8 +114,8 @@ define(function (require) { var timing; if ( - performance - && rowsPerTick === void 0 + rowsPerTick === void 0 + && typeof window.performance === 'object' && typeof performance.now === 'function' ) { timing = performance.now(); @@ -129,11 +129,12 @@ define(function (require) { .forEach(forEachRow); if (timing) { + // we know we have performance.now, because timing was set var time = performance.now() - timing; var rowsRendered = rowsPerTick; var msPerRow = time / rowsPerTick; // aim to fit the rendering into 5 milliseconds - rowsPerTick = Math.ceil(5 / msPerRow); + rowsPerTick = Math.ceil(15 / msPerRow); console.log('completed render of %d rows in %d milliseconds. rowsPerTick set to %d', rowsRendered, time, rowsPerTick); }