POV-Ray : Newsgroups : povray.general : How can we speed up the saving process? : Re: How can we speed up the saving process? Server Time: 1 Oct 2020 02:12:32 GMT
  Re: How can we speed up the saving process?  
From: Kima
Date: 11 Jul 2020 04:20:00
Alain Martel <kua### [at] videotronca> wrote:
> Le 2020-07-10 à 00:19, Kima a écrit :
> > I create a series of simple 4K scenes with 16/32 cores/threads. Each takes 10s
> > from which the parsing process is <1s, and the rendering process is 9s.
> >
> > In the rendering time, my CPU threads are used in the first 3s (technically, 1s
> > as it is a peak). This is exactly the period in which the temporary file
> > "pov-state" exists.
> >
> > It takes about 5s to save output.png when almost no CPU resource is used.
> > Obviously, I hope to reduce this period.
> >
>
> Those 5 seconds are almost entirely consecrated to the encoding and
> compression of the PNG file with only a small bit actually used to
> access the drive. It's almost all single thread, sequential data access,
> analysis and manipulation.
> I'm afraid that it can't get reduced by much, unless you are willing to
> reduce the compression factor, resulting in a larger file.

As an update, if it might be beneficial to others.

In my experience, the slowest format to save is PNG. Of course, PNG is the best
and common format in terms of quality and size.

Saving in JPEG is the fastest though it is highly compressed. Unfortunately, a
heavily lossy format like JPEG is not suitable for the purpose of ray tracing.

JPEG with 100% quality is close to PNG (POV-Ray see 85% by default). The
official document emphasises that even with 100% quality, there might be some
artefacts. I am inspecting this failure but haven't found any yet. JPEG with
100% quality is about 40% of PNG size.

As a side note, I believe the default value of compression in POV-Ray (85%) is
too low. The default value in ImageMagick for conversion to JPEG is 92%. It does
not make sense to use many resources to ray trace a scene and save it as a
heavily lossy format.


Post a reply to this message

Copyright 2003-2008 Persistence of Vision Raytracer Pty. Ltd.