Comment 8 for bug 167869

Revision history for this message
Tomasz Sztejka (sztejkat) wrote :

I can confirm that behaviour with any large file which takes significant amount of time to load in Inkscape.

The user side solution to that problem WOULD be simple: disable preview. The catch is, it doesn't work - it seems that preview loading code is running REGARDLESS if preview box is checked or not. Effectively it prevents You from opening large file since any click on it's name causes "hang" when hidden preview is generated. Sad but true.

Inkscape 0.48.3.1 r9886 running Linux.

There are three possible solutions:

 -first, fix an obvious mistake and not only hide preview when "preview" check-box is unchecked but also DO NOT run preview generation code.

 -second, which will help solving huge lags when working with large objects and large blurs - make renderer interruptible. That is, for an example, after rendering each single object/section/whatever You do have there, monitor if "abort rendering" singnal is set. This signal might be set for an example by user pressing ESC key. This should be doable even if renderer isn't thread safe. I don't know GTK details, but it might be possible to poll for ESC from another thread and set a signal for a renderer in a tiny well controlled thread safe place. Since this is a boolean signal which can be set once and only once each pass there is really no need for synchronisation code. The same functionality may be used to timeout a renderer, which, in my opinion, would be a very nice feauture. I do have to, from time to time, to go for a coffee (up to 2 minutes or so) until a blurred image is rendered. And have no way to interrupt it.

 -third, if preview functionality is essential, generate a tiny bitmap at save and embedd it as a comment or some hidden element in an "Inkscape SVG" file. Thous generating preview might be simple, fast and accurate enough.

Anyway, great tool. But slow as a hell in a very surprising places. Shame there is so very little comments in source - it's too time consuming to get involved in fixing it.