Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appendData performance issue simple fix #678

Open
dizcza opened this issue Sep 20, 2021 · 0 comments
Open

appendData performance issue simple fix #678

dizcza opened this issue Sep 20, 2021 · 0 comments

Comments

@dizcza
Copy link

dizcza commented Sep 20, 2021

Problem

The line 456

mData.remove(0);

of BaseSeries.appendData function makes an internal copy of the whole array on each call. This is because mData is initialized as an ArrayList.

Solution

A simple solution would be changing the mData from ArrayList to LinkedList. A better solution would encorporate some sort of a fixed-size list to hide this routine into a simple instruction mData.add(dataPoint).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant