Fill tool performance

Flesh out your ideas for new or improved Inkscape features before submitting a request.
The Masked Retriever

Fill tool performance

Postby The Masked Retriever » Thu Oct 11, 2007 12:51 pm

So I just got the build in Inkscape0709251607.7z opened up and used the fill tool for the first time, and let me tell you, it's going to save my bacon in a big way. Cartooning with InkScape just got way better.

However, it slows down on my pitiable P4 system pretty good. Specifically, it seems to do so as a function of the number of lines in the image. Here's what I know:

The fill tool is fast at first. Open up a new document, and the fill tool runs quick. Lay down a few hundred objects (cartooning is like that) and it slows down.

If I have a big file open and I use the fill in a little file, the fill tool is as slow as if I use it in the little file or the big one.

Oddly enough, this doesn't seem to happen if I open a previously large file-- I have to ~make~ a file large in order for it to slow down a smaller file.


This indicates to me that the fill tool is searching through the brushstroke history somehow to decide how far its edges should go. This might work fine on small files but in big ones, or when the stroke history is long, this may drag for users with slower computers, or with much larger files.

I'm not sure how to fix this, but it seems like maybe some kind of culling system could be put in place for deciding which objects to boundary check or maybe some fix with rasterization? Just my two bits on that...

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Fill tool performance

Postby microUgly » Thu Oct 11, 2007 1:05 pm

This sounds like a problem worthy of reporting on the dev mailing list.

But the way the fill tool works is basically exactly the same as in a raster editor. I believe it converts the viewport (the area of the canvas you can see) to bitmap, does a bitmap fill and then converts that bitmap fill to a vector. You can see why it may be slow. NOTE: because it uses the viewport you'll notice the fill effect will not extend beyond the viewable canvas - you can pan the canvas then hold SHIFT to add to the filled area.

I beleive it's also recognised that having the "Close Gap" option set to anything other than "None" will slow the effect.

The Masked Retriever

Re: Fill tool performance

Postby The Masked Retriever » Thu Oct 11, 2007 4:03 pm

Hm, so does that mean that having the viewport zoomed in will speed things up by requiring fewer objects be rasterized?

Also, could this perhaps be enqueued when the fill tool is selected, allowing things to catch up while the user decides where to click? (that's maybe a bit silly but eh)

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Fill tool performance

Postby microUgly » Thu Oct 11, 2007 4:09 pm

Zooming in may speed it up - it was something I was meant to suggest.

I'm not sure pre-rasterising would be a good idea as it would have to perform the operation everytime you change your view.


Return to “Inkscape Ideas”