mirror of
https://github.com/webodf/WebODF.git
synced 2026-11-30 16:47:58 +01:00
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:
@@ -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
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user