chartium / libchartium

📈 The fastest plotting library on the block 🚀
0 stars 0 forks source link

Ticks get calculated wayy too many times #75

Closed Quacken8 closed 7 months ago

Quacken8 commented 8 months ago

May be a symptom of deeper reactivity issue..?

image

RisaI commented 7 months ago

At the moment there are 6 invocations when creating a chart. 3 short-circuit, the remaining three are:

  1. an initial invocation, when the minimal set of dependencies is satisfied
  2. a recalculation when measureTextSize is provided (only possible after the AxisTicks element mounts)
  3. canvas resize due to the other chart components mounting

I don't believe there's currently a straightforward way to reduce it even more.