Hi
I created a new NodeCore-Class, derived from MaterialDrawable, and store
a Tree in it. For this tree, i want to use one Multi-Field for each
level, so i need some kind of Multi-Field of Multi-Fields ;-)
As an Example, for my Positions i use a "MFGeoPositionsPtr".
When i create a new treelevel, i do:
pgp->getPositions().push_back(GeoPositions3s::create());
To add a new Position, i do:
GeoPositions3sPtr::dcast(pgp->getPositions(treelevel))
->getFieldPtr()
->push_back(Pnt3s(value1, value2, value3));
So every Position should need 6 Bytes.
I do the same for Normals, Colors and some other things. Alltogether,
every Node in my tree should need 25 Bytes.
If i build, for example, a tree with about 2.6 Million nodes, there
should be a memory-consumption of about 65 MB.
In Fact, it needs at least 1.5 GB of RAM!
Its the same with a much smaller tree, every node seems to use about 580
Bytes instead of 25.
I already tested if the data is wrongly stored multiple times, but its not.
The Number of Stored Values at each level (and the number of levels) is
OK. To check this, i used this code:
UInt32 splatnum=0;
UInt32 levelsize=0;
UInt32 levelnum=0;
levelnum=pgp->getPositions().size();
std::cout<<"Positions:"<<std::endl;
for (UInt32 i=0; i<levelnum; i++) {
levelsize = pgp->getPositions(i)->size();
std::cout<<"Nodes in Level "<<i<<": "<<levelsize<<std::endl;
splatnum += levelsize;
}
std::cout<<"Nodes Together: "<<splatnum<<std::endl;
Any Idea why it takes so much memory?
What can i do?
Thanks
Lars
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users