From: Yair Kurzion (yair++at++polygon.engr.sgi.com)
Date: 04/19/2000 15:02:13
Hello Aron !
> I'm wondering if anybody has a theory why a node saved & restored as a
> .pfb via pfdSaveFile/pfdLoadFile would occupy MORE MEMORY after
> restored?
>
> o First, the app. generates some geometry, and saves it to multiple .pfb
> files.
> o The app is then restarted such that it loads the .pfb files instead of
> generating the geometry from scratch.
> o File saving/loading takes place in the APP process
> o I tried to optimize restored nodes with pfdMakeShared,
> pfdCombineLayers, pfdCleanTree to no effect.
>
> The pfMemory usage from the restored nodes appears to be TWICE!! (?)
> that of the memory usage from the constructed node. Sorry I don't have
> any "hard" numbers yet, but dang if it ain't using much more memory!
>
> Human nature being what it is (i.e. "blame the other guy" ;-) I might
> guess that pfdLoadFile is leaky, or over-allocating memory for
> vertices/colors that don't exist. Some smart performer out there please
> set me straight!
Some comments:
o When you load a pfb file and call pfSync/pfFrame, Performer creates a copy of
your scene graph for the CULL process (if one exists). If you use multiple
graphic pipes, Performer creates a copy of your scene graph for each pipe.
If you use an ISECT process, Performer creates a copy of the scene graph for
ISECT.
If your pfb creating code does not draw the model (via pfSync/pfFrame),
Performer doesn't create extra copies of the scene graph.
A simple way to test this is running your pfb-loading application in single
process. In this mode, no copies are made.
o The pfb loader allocates some internal structures for loading your file.
These structures are not freed because they get re-used every time you
load a pfb file. In other words, when loading multiple instances of your model
the pfb loader will not allocate any more than when loading a single instance.
o We test for leaks in the pfb loader by running the loop <load, draw, delete>
on a collection of models many times and observing memory usage. I have small
programs showing that the pfb loader doesn't leak.
-yair
--
\_________ \_____ \__ \__ \_____ Yair Kurzion
\_________ \_____ \__ \__ \_____ yair++at++sgi.com
\__ \__ \____\__ \__ http://reality.sgi.com/yair
\__ \__ \__ Work: (650) 933-6502
\__ \__ \__ Home: (408) 226-9771
\__ \__ \__
This archive was generated by hypermail 2b29 : Wed Apr 19 2000 - 15:02:39 PDT