diff options
| author | Olli Parviainen <oparviai@iki.fi> | 2018-12-08 14:37:04 +0000 |
|---|---|---|
| committer | Olli Parviainen <oparviai@iki.fi> | 2018-12-08 18:24:05 +0000 |
| commit | 1062580959edcb03cce8419e8c16dea5fa69effa (patch) | |
| tree | 2575351f757de6e756cb9a594ceaa238fd6519c2 /src | |
| parent | Merge branch 'master' of gitlab.com:inkscape/inkscape (diff) | |
| download | inkscape-1062580959edcb03cce8419e8c16dea5fa69effa.tar.gz inkscape-1062580959edcb03cce8419e8c16dea5fa69effa.zip | |
Accelerate the break-apart operation for larger paths by disabling redrawing the canvas during the break-apart algorithm is running.
Testing this change with a large pathset accelerated the break-apart operation duration from 24 seconds down to mere 4 seconds.
Signed-off-by: Olli Parviainen <oparviai@iki.fi>
Diffstat (limited to 'src')
| -rw-r--r-- | src/path-chemistry.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 9a1d67e16..b58fa4f15 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -32,6 +32,7 @@ #include "verbs.h" #include "display/curve.h" +#include "display/sp-canvas.h" #include "object/box3d.h" #include "object/object-set.h" @@ -207,7 +208,8 @@ ObjectSet::breakApart(bool skip_undo) desktop()->messageStack()->flash(Inkscape::IMMEDIATE_MESSAGE, _("Breaking apart paths...")); // set "busy" cursor desktop()->setWaitingCursor(); - + // disable redrawing during the break-apart operation for remarkable speedup for large paths + desktop()->getCanvas()->_drawing_disabled = true; } bool did = false; @@ -281,9 +283,11 @@ ObjectSet::breakApart(bool skip_undo) g_free(style); g_free(path_effect); } - - if(desktop()) + + if (desktop()) { + desktop()->getCanvas()->_drawing_disabled = false; desktop()->clearWaitingCursor(); + } if (did) { if ( !skip_undo ) { |
