CanvasItemGroup::update is too slow to handle typical multi-page documents
Summary:
As of recent master ae62f47f, zooming/rotating a multi-page document is extremely slow, even with the changes of !3838 (merged). It turns out CanvasItemGroup::update is taking excessively long to update the geometry. This shows up as huge bars for on_idle, where this function is called:
Steps to reproduce:
- Open Inkscape.
- Open any PDF document containing more than one page in 'Internal import' mode.
- Attempt to zoom/rotate.
What happened?
Extremely low framerate, about 6 fps.
What should have happened?
A normal framerate, currently about 30-60 fps.
Other notes
-
Splitting a multipage document into its constituent pages and viewing those doesn't result in any slowdown, suggesting the inefficiency lies purely within the multipage implementation. -
Huge kudos to @doctormo for this feature I've wanted for years!
Edited by PBS
