Suppress manual task processing to prevent skewing of benchmark figures

Manually processing the redraw tasks vastly affects the current benchmark
results, dwarfing impacts from most other subsystems. Disabling this for
now to aid tuning of non-UI components.
This commit is contained in:
Philip Peitsch
2014-05-16 21:28:46 +10:00
parent 397769d7bb
commit cd8bf92832
2 changed files with 13 additions and 1 deletions
+2
View File
@@ -40,6 +40,7 @@ define(["OdfBenchmarkContext"], function(OdfBenchmarkContext) {
"use strict";
runtime.loadClass("core.EventNotifier");
runtime.loadClass("core.Task");
runtime.loadClass("odf.OdfCanvas");
/**
@@ -80,6 +81,7 @@ define(["OdfBenchmarkContext"], function(OdfBenchmarkContext) {
});
events.emit("start", {});
core.Task.SUPPRESS_MANUAL_PROCESSING = true;
context.odfCanvas = new odf.OdfCanvas(canvasElement);
currentActionIndex = -1;
executeNextAction();
+11 -1
View File
@@ -90,6 +90,14 @@
*/
core.Task = {};
/**
* Disable manually processing of tasks when core.Task.processTasks is called.
* This is only used during benchmarks to prevent caret redraws from skewing
* the resulting numbers
* @type {!boolean}
*/
core.Task.SUPPRESS_MANUAL_PROCESSING = false;
/**
* Process any outstanding redraw tasks that may be queued up
* waiting for an animation frame
@@ -97,7 +105,9 @@
* @return {undefined}
*/
core.Task.processTasks = function() {
redrawTasks.performRedraw();
if (!core.Task.SUPPRESS_MANUAL_PROCESSING) {
redrawTasks.performRedraw();
}
};
/**