On Fri, 2012-10-19 at 16:50 +0200, Dexter Filmore wrote:
> Am Thursday 18 October 2012 21:05:35 schrieb Jernej Simončič:
> > On Thu, 18 Oct 2012 13:47:56 +0200, maderios wrote:
> > > I have a Core I7 with 8 cpu. I noticed Gimp use only 1 cpu to save image.
> >
> > If you're talking about saving a file, there's not much that can be done -
> > saving isn't something that can be parallelized.

> Well... writing to disk sure can't, but I guess there are image compression 
> algos that can utilize multicores? After all, formats as png and jpg as far 
> as I know, correct me if I'm wrong, tile the image and work on the tiles 
> first.

Yes, both jpeg and png are amenable to some thread support.
For that matter, disk writes can be parallelized and this can in fact
help with perceived performance, although it an also make the system so
busy it appears to "freeze up" during a save.  Since saving a PNG file
takes several minutes even on fairly fast computers I can sympathize
with the desire to make it go faster.

> so if one would allocate a target memory area in RAM first and then fill the 
> mem map with the to-be-saved data one could open a file handle right from the 
> start and copy the mem portions to disk as they get filled by the compression 
> algo.
The problem with this is that you don't know in advance how much memoro
to allocate or where to write, because the compression varies depending
on patterns of light and dark (for example) in the image.

> Or another approach would be make a copy of the image in RAM and do the save 
> in the background. That way when using the same file name one would even 
> narrow the state transition of the file to a minumum.

It's done in a separate process right now, but copying the image in
memory, if it's, say, a one gigabyte image, might be problematic. And
the images that need to be sped up are the fast ones.

It might be faster in some cases for gimp to do a "merge visible layers"
before a save, I don't know.


Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml

gimp-user-list mailing list

Reply via email to