very slow PNG writes

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: XnTriq, xnview

Post Reply
User avatar
rra
Posts: 190
Joined: Thu May 11, 2006 1:46 pm
Location: The Netherlands

very slow PNG writes

Post by rra » Wed Sep 16, 2009 3:08 pm

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 !!

eL_PuSHeR
Posts: 267
Joined: Sat Apr 25, 2009 9:23 am

Re: very slow PNG writes

Post by eL_PuSHeR » Thu Sep 17, 2009 6:41 am

Maybe Photoshop and the others programs aren't using maximum compression + preprocessing filters thus taking less time to complete.
Intel i7 5960X
Gigabye GA-X99-Gaming 5
8 GB DDR4 (2100)
GeForce GTX 970 (Gigabyte)

User avatar
rra
Posts: 190
Joined: Thu May 11, 2006 1:46 pm
Location: The Netherlands

Re: very slow PNG writes

Post by rra » Thu Sep 17, 2009 8:56 am

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é

marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Re: very slow PNG writes

Post by marsh » Thu Sep 17, 2009 9:22 am

A related discussion:
PNG compression levels

User avatar
xnview
Author of XnView
Posts: 31362
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: very slow PNG writes

Post by xnview » Thu Sep 17, 2009 10:40 am

rra wrote: where XnView uses all cores of a multi-core processor, or is it only single core ?
XnView use only 1 core
Pierre.

User avatar
JohnFredC
XnThusiast
Posts: 2010
Joined: Wed Mar 17, 2004 8:33 pm
Location: Sarasota Florida

Re: very slow PNG writes

Post by JohnFredC » Thu Sep 17, 2009 3:16 pm

Ah...!!!

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

8)
John

User avatar
xnview
Author of XnView
Posts: 31362
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: very slow PNG writes

Post by xnview » Thu Sep 17, 2009 3:32 pm

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)
Pierre.

User avatar
rra
Posts: 190
Joined: Thu May 11, 2006 1:46 pm
Location: The Netherlands

Re: very slow PNG writes

Post by rra » Thu Sep 17, 2009 6:25 pm

Good news again Pierre,
will this MP version also support 64 bit ??

René

User avatar
xnview
Author of XnView
Posts: 31362
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: very slow PNG writes

Post by xnview » Fri Sep 18, 2009 8:11 am

rra wrote:Good news again Pierre,
will this MP version also support 64 bit ??
XnViewMP will have win, linux & mac 32 & 64bits version
Pierre.

Post Reply