Branch: refs/heads/master Home: https://github.com/synfig/synfig Commit: 9bd669d14d0f4d187a3adba271f4a206feaec194 https://github.com/synfig/synfig/commit/9bd669d14d0f4d187a3adba271f4a206feaec194 Author: mosasauridae <143972888+mosasauri...@users.noreply.github.com> Date: 2023-09-06 (Wed, 06 Sep 2023)
Changed paths: M synfig-studio/src/synfigapp/action_system.cpp M synfig-studio/src/synfigapp/action_system.h Log Message: ----------- perf: optimized Action_System so that the canvas only renders once during an action (#3200) The problem was that every time any property node emitted signal_changed() during an action, it would cause the canvas to queue a render. The number of times signal_changed() happens seems to grow non-linearly with the number of objects being modified during the action. This was a killer for bulk update actions, where this could easily trigger thousands or potentially even millions of unnecessary renders. I have seen a single bulk action take almost an hour. The fix is to temporarily block the Canvas_Interface::signal_dirty_preview() signal while an action is in progress, and then manually trigger it once the action completes. This guarantees the scene will only render once the action is done, and seems to be a dramatic performance improvement in longer animations at least in my testing. I ran some A-B comparisons on a test file. The file has a spline with 100 vertices linked to a bone, and the bone angle parameter has 600 waypoints. - Modify bone angle with Animate Mode off and apply offset: ~3min 40s before -> ~1.5s after - Move a keyframe: ~4min 25s before -> 0.7s after _______________________________________________ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl