POV-Ray : Newsgroups : povray.programming : POV memory usage : POV memory usage Server Time
28 Jul 2024 22:22:52 EDT (-0400)
  POV memory usage  
From: Rainer Mager
Date: 28 Apr 1999 00:09:17
Message: <37267bdd.0@news.povray.org>
Hi all,

    I was recently trying to trace a scene that had about 160,000 objects,
the vast bulk of those were just square boxes. The machine I was one died
trying to do this when it ran out of swap (I have a much nicer machine with
256M RAM that would just grin at this but I haven't had a chance to try it
there yet.). I then changed one of my loops and decreased the objects to
about 40,000 and this did finally parse and trace. I noticed that at this
point memory usage peaked at about 37MB. I then reduced it more to about
2800 objects and memory usage went to just over 3MB. What this seems to tell
me is that there is some general memory usage overhead and then
approximately 900 bytes per object after that.
    Now, my question is, why is so much memory needed? After all, 900 bytes
is 225 4 byte values. Does it really take 225 number to define a single
object, especially a box. I mean there are thing like corner 1 (3 values),
corner 2 (+3 = 6), rgbtf (+5 = 11), texture (a simple one including interior
should be about +20 values = 31), rotation (+3 = 34), and scaling (+3 = 37).
So even if I forgot a bunch I still don't see it much more than double that
at 70 values and certainly no more than 100. So how come memory usage is 225
values? Also, some of these should not need to be 4 byte values. The color
components are all really only 0 to 256 anyway, is an 4 byte value used or
is some conversion done?
    Anyway, I'd really like to see if this could be reduced somehow without
reducing performance. Even if some type conversions need to be done if the
memory usage is reduced by half it should be worth it. Can someone with more
experience in the code comment on this?


Thanks,

--Rainer


Post a reply to this message

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