From 9ca829f2675e0be2e35d67d45dd91cc28c9c2cfe Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Aug 2011 07:35:17 +0300 Subject: [PATCH] From antrob; don't recalculate layout when updateOptions() would not change it. This suppresses recalculation of the pixel position of points when calling updateOptions() with options which will not affect the layout. Insignificant for small graphs, but this change provides a great performance boost for changing options for graphs with multiple data sets. Anthony saw something like a 30-40% speedup for dense charts. --- auto_tests/misc/local.html | 1 + auto_tests/tests/update_options.js | 112 +++++++++++++++++++++++++++++++++++++ dygraph-utils.js | 105 ++++++++++++++++++++++++++++++++++ dygraph.js | 29 +++++++--- 4 files changed, 239 insertions(+), 8 deletions(-) create mode 100644 auto_tests/tests/update_options.js diff --git a/auto_tests/misc/local.html b/auto_tests/misc/local.html index 428e444..0d653c1 100644 --- a/auto_tests/misc/local.html +++ b/auto_tests/misc/local.html @@ -27,6 +27,7 @@ +