GraphView icon indicating copy to clipboard operation
GraphView copied to clipboard

appendData performance issue simple fix

Open dizcza opened this issue 4 years ago • 0 comments

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).

dizcza avatar Sep 20 '21 10:09 dizcza