On Thu, 2004-11-18 at 17:02, David Christian Berg wrote:
I'm kinda confused, that rendering takes a lot longer, when I zoomed in to a place, while when zoomed out moving objects was quite fast, but well, is not a accurate of course. Any explanation for the really annoying slow down when zoomed in?
livarot, like most renderers, approximates bezier curves by subdividing them into shorter line segments. As you zoom, livarot divides them more finely, creating more line segments.
On top of this livarot finds the intersection of all of the subdivided segments with each other, divides them again at their intersection points, and re-winds the path. For rendering, I don't think this is actually necessary.
The resulting polygon is cached, but needs to be recomputed every time the "original" path is changed.
Also, any operations with it still take a long time because their are so many line segments after fine subdivision -- including mouse motions, which currently check to see which shape they are inside for each mouse event.
Approaches to remediation include:
* only compute the subdivided/stroked/etc paths for the portions that are within the viewport or dirty area (tricky for dashed strokes though)
* remove the unneeded self-intersection (fred tells me it was a workaround for a bug that he never understood)
* only repaint the section of the path that changed
* stop routing events through NRArenaItems, at least for SVG objects
Probably all of these are too agressive to attempt for this release, unfortunately.
-mental