Can someone explain to me how I can avoid the performance decline of drawing on a Canvas, as it's size gets bigger?
What's the reason for this?
The same stroke on a Canvas is executed more and more slowly, as the size of the Canvas increases.
It also seems that, despite "dirty-area" rendering techniques used by JavaFX, rendering of the scene becomes slower as the size of Nodes increases (ex.: the Canvas),
even when the bulk of it is offscreen. Speed is acceptable when the Canvas completely fills my screen with it's size, so the whole screen already needs to be redrawn,
but as I increase the size, so the Node/Canvas already extends outside of the Window, rendering performance continually decreases as the Node gets bigger.
This is remedied, when setCache(true) is applied.
This does however NOT improve drawing performance on the Canvas, where low latencies are critical for a Painting App.
Which seems to be implied, as the documentation advises NOT to Cache, if the Node changes frequently.
Surprisingly then, still setting Cache to True on the currently drawn on Canvas, plus CacheHint = SPEED, seems to improve speed a little.
Anyway, back to the question: Why is drawing on a Canvas becoming slower with size, although the same stroke, covering the same amount of area, is executed?
Apologies if I sound confusing or repeated myself, I am extremely tired. Thank You in advance, and good night.