On Thu, Dec 31, 2009 at 12:03 AM, Luka Čehovin <[email protected]>wrote:

> Hi everybody,
>
> So I have implemented non-gui-blocking saving/loading with a progress
> bar, but the problem is that even though the progress bar window is
> modal the default gnome (at least) does not prohibit background
> windows to receive events (perhaps some usability thing). As already
> discussed on IRC this opens a problem of locking the document for the
> time of loading or saving. I have started to implement such a lock but
> while it looked like an easy job at the beginning a foolproof lock is
> quite hard to make because the document-modifying code can be found in
> many places (most of which are undocumented). I have almost abandoned
> short term plans for some kind of locking mechanism (until some
> serious refactoring and/or documenting will be done) and I am starting
> to consider the second option: clone the document and save the clone
> (possibly in the background). The problem in this case is high memory
> requirement of the clone. I would therefore like to hear some opinions
> regarding all this. My opinion is that some kind of locking mechanism
> will still be needed ... but the cloning would indeed look fancy
> because you do not have to stop your work (for 10+ seconds in my
> case).
>
Going out on a bit of a tangent here, bear with me.
Generally my thoughts regarding this is that we should work on getting
saving fast first. When that is done, or is proves unfeasible then we can
seriously think about saving async or other approaches.

Sidenote: Quick and hacky measurement of MyPaint and Krita shows that on a 2
layer (background plus a simple layer) image at 38Mpixel resulted in Krita
2.1 being about 50% _slower_ than MyPaint git on saving. MyPaint took around
20 seconds, Krita took cirka 30s.
Hardware: 2ghz core2duo laptop and OCZ Vertex SSD

On this image, which is little over 20MB on disk, MyPaint used 819/592MB,
Krita 1077/376MB, GIMP 894/712MB (virtual/resident memory) after a fresh
load. These numbers are not very comparable to eachother, but in any case:
An image that has unacceptably long saving times is huge in memory. So huge,
that if naively cloning it swapping might become a realistic problem. We
could do shallow cloning/copying (copy


-- 
Regards Jon Nordby - www.jonnor.com
_______________________________________________
Mypaint-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/mypaint-discuss

Reply via email to