Conversation
a635144 to
fa09223
Compare
kurkle
left a comment
There was a problem hiding this comment.
I like the idea, but I don't like the implementation. Its getting really hard to follow what is contained in ticks or me.ticks or me._ticks at different stages and why.
Could the same performance gain be achieved by just changing computeLabelSizes to use sampleSize?
43ef566 to
7b66d0c
Compare
Unfortunately, it's a little more complicated than that. The main thing we want to do to achieve the performance gains is have
I agree that it's quite hard to follow |
7deb0c6 to
c80f168
Compare
c80f168 to
a8f9603
Compare
This allows users to set a
sampleSizeoption which is a major performance improvement when there's a large number of ticks / labelsThe charts render nearly twice as fast with this option. Here's timing information for
samples/scales/time/financial.htmlchanged to render 8,000 datapoints:Without this PR: 520ms
With
sampleSize: 100: 272msPlunker: https://plnkr.co/edit/Bj6unMv5JSL69nfUZ3zx?p=preview