Skip to content

Commit

Permalink
fix(line): optimize sampling lttb, remove _newIndice. close apache#14689
Browse files Browse the repository at this point in the history
  • Loading branch information
fuchunhui committed Feb 15, 2022
1 parent 6b40654 commit e258370
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/data/DataStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1002,12 +1002,7 @@ class DataStore {
// First frame use the last data.
newIndices[sampledIndex++] = this.getRawIndex(len - 1);
target._count = sampledIndex;

const _newIndices = new (getIndicesCtor(this._rawCount))(sampledIndex);
for (let idx = 0; idx < sampledIndex; idx++) {
_newIndices[idx] = newIndices[idx];
}
target._indices = _newIndices;
target._indices = newIndices;

target.getRawIndex = this._getRawIdx;
return target;
Expand Down

0 comments on commit e258370

Please sign in to comment.