You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/07/13 13:54:30 UTC

[echarts] branch dataset-perf updated: refact(data): not clone store if possible

This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a commit to branch dataset-perf
in repository https://gitbox.apache.org/repos/asf/echarts.git


The following commit(s) were added to refs/heads/dataset-perf by this push:
     new 50d430d  refact(data): not clone store if possible
50d430d is described below

commit 50d430d7e861c1ea9d0dc969a9f42a24df3bf694
Author: pissang <bm...@gmail.com>
AuthorDate: Tue Jul 13 21:52:06 2021 +0800

    refact(data): not clone store if possible
---
 src/data/SeriesData.ts | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/data/SeriesData.ts b/src/data/SeriesData.ts
index f01c349..e2e5345 100644
--- a/src/data/SeriesData.ts
+++ b/src/data/SeriesData.ts
@@ -812,6 +812,8 @@ class SeriesData<
             validateDimensions(this, dimIndices);
         }
 
+        // Clone first
+        this._store = this._store.clone();
         this._store.filterSelf(dimIndices, (fCtx
             ? zrUtil.bind(cb as any, fCtx as any)
             : cb) as any
@@ -840,6 +842,7 @@ class SeriesData<
             validateDimensions(this, dimIndices);
         }
 
+        this._store = this._store.clone();
         this._store.selectRange(innerRange);
         return this;
     }
@@ -1195,7 +1198,7 @@ class SeriesData<
         }
 
         transferProperties(list, this);
-        list._store = this._store.clone();
+        list._store = this._store;
 
         return list;
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org