Hi Philip, How are you integrating the DatabasePager into your app? I don't see problems with memory problems like you describe with osgviewer and osgProducer::Viewer related apps. Are you able to recreate the problems with these?
The reason why I raise this is that I've pretty heavily tested the paging and expiry of subgraphs and believe it to work just fine. Future future reference I don't use diff's in my day to day work, they cause my much more pain than they are worth. Robert. On 1/11/07, Philip Lowman <[EMAIL PROTECTED]> wrote:
Robert Osfield wrote: > The DatabasePager does no remove subgraphs and associated OpenGL > objects straight away, but has adjustable time limits that govern how > long they live before they are expired. See the DatabasePager API for > details. Robert, Thanks for pointing this out but this turned out not to be my problem. Instead the issue appears to be in the DatabasePager class itself. For reasons I don't quite understand the _activePagedLODList and _inactivePagedLODList seem to be named from the wrong perspective. It seems they are named from the POV of an "active PagedLOD candidate that could be paged in" vs. merely an actively paged-in PagedLOD. Anyways, the removeExpiredChildren() call to each osg::PagedLOD is only done on the _inactivePagedLODList (read: PagedLODs that are in range of the eyepoint). As soon as a PagedLOD moves away from the eyesight it gets immediately added to the _activePagedLODList but removeExpiredChildren() is not called on the _activePagedLODList list for reasons I don't understand. This is why my memory usage is through the roof and also why calling removeExpiredChildren manually seemed to help (recall my December '06 thread on the issue). The PagedLODs are moving outside of their range but the unused databases are never being expired. Furthermore, there is an unsigned int called _targetNumOfInActivePagedLODs that I would argue should become a part of the API for osgDB::DatabasePager. This value prevents the calls to removeExpiredChildren unless one reaches the hardcoded value of 100 PagedLODs in the _inactivePagedLODList. Here's what I did to work-around the problem and make the number of cached pagedLODs configurable. The diff is against OSG 1.2 but applies to the latest CVS. -- Philip Lowman Simulation Development Engineer, Modeling and Simulation Technology General Dynamics Land Systems http://www.gdls.com _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
