Batch up calls that refresh the canvas CSS, size or annotations

These calls are UI render-related operations, and don't need to be done
immediately after every operation. Batching these up and doing them all
once after all ops are processed greatly improves the performance of
paragraph alignment updates with multiple paragraphs selected.
This commit is contained in:
Philip Peitsch
2014-02-05 22:53:37 +11:00
parent ae0c695971
commit eb3d8aefbf
3 changed files with 38 additions and 11 deletions
+1 -3
View File
@@ -121,9 +121,7 @@ define([
benchmark.actions.push(new RemovePositions(100, true));
benchmark.actions.push(new SelectEntireDocument());
benchmark.actions.push(new BoldCurrentSelection());
if (config.includeSlow) {
benchmark.actions.push(new AlignCurrentSelectionJustified());
}
benchmark.actions.push(new AlignCurrentSelectionJustified());
benchmark.actions.push(new RemoveCurrentSelection());
this.start = benchmark.start;