plottable icon indicating copy to clipboard operation
plottable copied to clipboard

Plot._computeExtent is called too many times.

Open aicioara opened this issue 10 years ago • 0 comments

screen shot 2015-07-22 at 2 57 02 pm

^ That is for a single plot rendered. The logged values are the domain[] of the x-scale, which as it can be seen does not change

It seems like there are a lot of redundant calls to Plot._computeExtent, and possibly other similar methods.

Not flagged as a performance issue yet, but assuming we have 100k data points, this method iterates over them all and applies a filter, which results in a lot of garbage. Maybe we should operate into a more factory pattern way, gather the requirements in a lightweight mode and calculate the necessary pieces only on .render(). This will change a good amounts of tests though (in the sense that we have to start rendering components to svg to test them, or hook into appropriate methods)

As an aside, during my perf testing, I found out that a good amount of time was spent on garbage collection (can't remember exact numbers, but it was probably 10% of the time)

aicioara avatar Jul 22 '15 22:07 aicioara