3 ms·
i think a better question to ask is why the others are not faster. honestly i cannot answer that question without digging into the source of each to find their
by leeoniya 7y ago
i think a better question to ask is why the others are not faster. honestly i cannot answer that question without digging into the source of each to find their bottlenecks.
allocating a ton of small objects or arrays is a very common source of slowness.
- dbranes 7y agoNo part of this comment answers my question.
- leeoniya 7y agono, there is no breakthrough that i'm aware of. i took a raw canvas and a raw data structure of a single array per series, plus one for timestamps and made a loop to draw lines on a canvas. it turned out to be very fast. the mousemove interaction has rAF throttling applied and does a binary search over the timestamps plus some basic arithmetic. there's no "secret sauce" that makes it go fast. maybe the way it calculates scales is more efficient than the others. i honestly don't know without looking into what the others do, nor do i care enough to look into it.