Hi Tim, Thanks for spotting and reporting this issue. You reading is correct, the flush of the osgDB::Registry's object cache won't called till at least one PagedLOD is expired.
What really should be happening is that the DatabasePager shouldn't be responsible for flushing the object cache, it should be down to the viewer. It should should do this alongside the present call the DatabasePager::updateSceneGraph(). In svn/trunk I'm just modifying DatabasePager/osgViewer to do this more appropriate. Do you see this as a critical enough issue to require patching the 2.8 branch? A fix wouldn't be able to be as clean the changes I'm just making to svn/trunk, but something like moving the object cache flush to the top of the DatabasePager::capped_removeExpiredSubgraphs() would probably suffice. Robert. On Tue, Jul 28, 2009 at 2:41 PM, Tim Moore<[email protected]> wrote: > Hi, > I have questions about two things I noticed with the object cache > in osgDB::Registry. First, in Registry::readImplementation, > addEntryToObjectCache is called without a timestamp. This gives them > a timestamp of 0.0, so it seems to me that objects can be booted from > the cache one frame after they are loaded i.e., the next time that the pager's > updateSceneGraph function is run. On the other hand, in > DatabasePager::capped_removeExpiredSubgraphs, if there are no PagedLODs > to remove the function returns immediately and doesn't update/flush > the object cache. If there are few or no PagedLODs in the scene graph > -- FlightGear's use case -- then the object cache will never be flushed. > I'm not complaining because this is the behavior I want, but I wonder if > this was really the intent. > > Thanks, > Tim > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

