openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Openexr-devel] performance problem with exrenvmap due to memory consumt


From: Axel Waggershauser
Subject: [Openexr-devel] performance problem with exrenvmap due to memory consumtion
Date: Thu, 03 Jun 2004 15:04:38 +0200

Hi,

I tried to convert a 400M latlong rgb half exr with exrenvmap into a
cube-map with a width of 2048, that sums up to a memory footprint for
exrenvmap of about 725M. With running a full featured X desktop and 512M
of RAM I have to rely on swapping, OK, but there are two things I found
in the code that seem to unnecessarily demand my machines capabilities:

The loop in makeCubeMap calls repetitively EnvmapImage::resize() and
EnvmapImage::clear().

1. EnvmapImage::resize() calls Array2D<T>::resizeErase() which looks
like:

    T *tmp = new T[sizeX * sizeY];
    delete [] _data;
    _data = tmp;

So it first allocates new memory and _then_ deletes the old memory.
This makes no sens to me, especially since the same method of Array<T>
makes it the other way around.

2. EnvmapImage::clear() assign 0 to all pixels, but as far as I can see
this is for no reason, since they get assigned a new value in
makeCubeMap.cpp:195 anyway. It only means that I have to swap everything
in and out three times instead of two.

Any comments on this?

Thanks,
Axel.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]