Page 1 of 1

very slow PNG writes

Posted: Wed Sep 16, 2009 3:08 pm
by rra
Recently I am using large 8-bit PNG files ,
crooping them and then saving back to PNG format.
The files are about 25 MB large on disk (unpacked 88 MB) .
Loading the PNG takes some 10 sec. , but when I save this file it takes 4 1/2 minute, with full (single core) processor load of a core-2 duo processor.

Curious as I am I did the same test with Photoshop CS4, loading goes with the same speed,
when I save the file in PNG format CS4 uses the 2 cores of my Core-2 duo processor fully,
but yet it takes a full 13 1/2 (!) minute to complete.

I am glad that XnVIEW is about 3 times as fast , but still it takes a very long time,
what is going on here ?? , and is there room for optimization ?

By the way: are there any processes (loading,saving,manipulating data, ... )
where XnView uses all cores of a multi-core processor, or is it only single core ?

René


EDIT: doing the same test with Paint Shop Pro (version 7.02) gives me an even faster write: 66 secs , that should be our target !!

Re: very slow PNG writes

Posted: Thu Sep 17, 2009 6:41 am
by eL_PuSHeR
Maybe Photoshop and the others programs aren't using maximum compression + preprocessing filters thus taking less time to complete.

Re: very slow PNG writes

Posted: Thu Sep 17, 2009 8:56 am
by rra
you are right, it had to do with the compression-factor,
in XnVIEW the compression can be set from 0 to 9;
I did a quick check with these 10 settings:

compr.; time (s) ; size (MB)
0 ; 38 ; 89.9
1 ; 19 ; 31.8
2 ; 20 ; 30.8
3 ; 22 ; 29.5
4 ; 23 ; 27.3
5 ; 28 ; 27.2
6 ; 46 ; 26.9
7 ; 65 ; 26.5
8 ; 230 ; 25.8
9 ; 270 ; 25.5

There is a big difference both in time and size, but for me a compression-setting of 4 would be good enough with a, acceptable file-size and compression-time

René

Re: very slow PNG writes

Posted: Thu Sep 17, 2009 9:22 am
by marsh
A related discussion:
PNG compression levels

Re: very slow PNG writes

Posted: Thu Sep 17, 2009 10:40 am
by xnview
rra wrote: where XnView uses all cores of a multi-core processor, or is it only single core ?
XnView use only 1 core

Re: very slow PNG writes

Posted: Thu Sep 17, 2009 3:16 pm
by JohnFredC
Ah...!!!

Now there is a reason for an XnView "2.0": multi-core!

8)

Re: very slow PNG writes

Posted: Thu Sep 17, 2009 3:32 pm
by xnview
JohnFredC wrote: Now there is a reason for an XnView "2.0": multi-core!
After XnViewMP release, i'll work on multi core with XnViewMP (i've already made some tests)

Re: very slow PNG writes

Posted: Thu Sep 17, 2009 6:25 pm
by rra
Good news again Pierre,
will this MP version also support 64 bit ??

René

Re: very slow PNG writes

Posted: Fri Sep 18, 2009 8:11 am
by xnview
rra wrote:Good news again Pierre,
will this MP version also support 64 bit ??
XnViewMP will have win, linux & mac 32 & 64bits version