I have a timeline component, which displays an editable curve; effectively like an automation channel in a sequencer.
The curve is represented by a Path, and it all works very nicely. However, if I set my horizontal zoom to something very large, drawing this Path becomes incredibly slow. Only a tiny fraction of the path as a whole is actually visible (zoomed in such that it looks effectively like a straight line, with the majority of it outside the screen bounds), but it struggles plenty.
Is there a way to improve this kind of performance with Paths? Maybe clipping a path to a Rectangle? I get the feeling my only option is to only generate as much of the curve as would be visible, but that would be very fiddly indeed with the system I am using.