gotcha

Author Topic: Inkscape slow when more than 20 or so paths/objects exist  (Read 3038 times)

June 20, 2018, 09:38:34 AM
Read 3038 times

luthientinuviel

  • Jr. Member

  • Offline
  • ***

  • 10
I am using Inkscape 0.92.2 on a Windows 10 x64 Pro version 1803 build 17134.112 on a Lenovo Thinkpad T470 with 8 GB RAM and an i5 processor.

I have a group of 297 objects and paths that took 12 minutes to ungroup. I selected 29 objects and pressed delete. It took a minute and a half to delete them. I selected one object and it took 5 seconds to delete. While it is trying to execute any action, I cannot do anything else in Inkscape. If I click somewhere on it, the screen fades slighty and Not Responding appears in the title bar. If I leave it alone, it recovers. I cannot work consistently without having to wait. Sometimes, I have to make notes as to what I plan to do because of having to wait between actions. If I have more than 20 or so objects/paths, it always lags. If I select  I have to basically find something else to do while waiting. Everything else works fine on my computer. Only Inkscape takes forever.

The only (annoying) partial work around is to group anything I am not actively working on together. Then it does seem to work a little faster, but then there is the long wait between the extra groupings and ungroupings that I have to do. It makes working in Inkscape exhausting. Is there idea of what is going on or where to look for answers?


June 20, 2018, 01:30:08 PM
Reply #1

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Yes, that's a frequent problem, but usually there are ways to mitigate it.

Would you be able to share the file? The best way to solve it depends a lot on what kind of data is actually in the file.

June 21, 2018, 02:37:13 AM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I would think that 297 objects (assuming they are relatively simple objects), should not be causing as serious of performance issues as you describe, on the kind of system you describe.  Yes, sharing the file would enable us to possibly find out what is causing the performance problems.  But I'm going to make a guess.

With nothing selected, click File menu > Clean Up Document.  Keep your eye on the status bar.  It will tell you how much un-used data was removed.

Other guess is maybe the objects are filled with filters (including simple blur)?  297 filtered objects certainly will bring on the performance problems.  (Other guess - objects are huge in dimensions?)

Here's a tutorial/article I wrote to help people identify potential problems, and to either avoid them, or to continue working in a huge file.
https://forum.inkscapecommunity.com/index.php?action=articles;sa=view;article=35

But feel free to share the file anyway, if you want a potentially more definitive answer.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

July 02, 2018, 09:44:52 AM
Reply #3

luthientinuviel

  • Jr. Member

  • Offline
  • ***

  • 10
My apologies for the late reply. I have another project that took precedence with a shorter deadline. I did clean the document but the drag is still there. I had to remove some proprietary objects but here is the file that I have been working on for a side project. The balloons and the train are two where grouping is the only way I can work in a timely manner.

July 02, 2018, 12:40:52 PM
Reply #4

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I used File menu > Clean Up Document, which removed 823 defs.  It should be working better now.  Give it a try  :)

(Be sure not to have anything selected when you click Clean Up Document.  That will enable you to see how many defs were removed, in the status bar.  If something is selected when you do it, you can't see how much was removed.)

Fyi, here's a little tutorial/article which explains many ways to avoid performance issues.   https://forum.inkscapecommunity.com/index.php?action=articles;sa=view;article=35

 When a file starts to reach about the size of this one, I often start to see signs of performance issues.  Just to give you an idea what to expect.  But the article gives ways to avoid it.  And using various tricks, I can work in a file up to 4 or 5 mb, before the issues annoy me so much I'm ready to give up.  Of course, it's possible to work in even much larger files, if I'm just going to do 1 or 2 little things.  But for really working, drawing, adding more objects, 5 mb is about my limit.

Edit
Also, there are 23 raster images, which appear to consist of 23 tiny diamond shapes (or maybe other tiny shapes, I didn't look at every single one of them).  You could replace those with vector diamond shapes, and save a really significant amount KBs.  (I can't tell if they were imported, or if you used Make Bitmap Copy.)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

July 02, 2018, 12:48:23 PM
Reply #5

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Haven't read through the whole conversation but your file has 826 unused defs -click the file menu/vacuum defs/cleanup document option.
That can result in performance issues.

Looking into the defs they are mostly gradients and a vast amount of clipping paths.
So checked your drawing in outlines only rendering mode -way too many clipping is involved.
Any chance you were using parts coming from a pdf file? Because those can have unnecessary clippings.

If you ungroup everything in the file, the look won't change -yet there will be 1237 unused defs...

Also, if you want to use an object multiple times in your drawing, cloning could reduce the file size which could also be a risk for performance issues.
Like, currently there are multiple instances of the same gradients in the defs -check it in the dropdown list in the fill and stroke panel. Probably only a few dozen would be enough to draw the same image.
Remember to tick in the padlock icon when editing gradients. Otherwise each tweaking results in an additional gradient definition.

July 02, 2018, 12:54:17 PM
Reply #6

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Interesting!  I didn't realize that ungrouping would "release" more defs!  I thought clicking Clean Up Document removed all of them, regardless of groups.

I wonder if that should be considered a bug?  It doesn't seem quite logical to me.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

July 02, 2018, 02:35:28 PM
Reply #7

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Ungrouping eliminates the clipping of groups, resulting in unused clipping definitions. Maybe not what one would expect but the behave is totally intentional.

July 02, 2018, 06:59:33 PM
Reply #8

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Oooh, I see.  So defs aren't hiding in the groups.  It's just that ungrouping creates more.  Totally makes sense!

Thanks  :)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

July 08, 2018, 05:03:55 AM
Reply #9

ha1flosse

  • IC Mentor

  • Offline
  • ******

  • 65
    • Jellyfish Dessert
.. beside the helpful advices from brynn and Lazur - i have no problems with your file and the tasks you mentioned are done in an instant, not in seconds or minutes like you mentioned. normally, the performance lags editing objects with many node-points + if you have a bunch of them in your file, but that's not the case here. maybe microsoft ist stepping on the brake - did you receive an offer for adobe illustrator lately? :) i'm with ubuntu 16.04 on i3 2310 hw and 4GB of ram using inkscape 0.92.
  • 0.92
haifashion - textile art
http://www.haifashion.eu

July 08, 2018, 09:10:20 AM
Reply #10

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
I don't know if it has been mentioned, but: the objects dialog is often the culprit. Don't use it when you don't really need it. Close it, then restart Inkscape. The slow-down does not depend on it being open or not, it depends on it *having been open at least once* during the current Inkscape session.