Hi Farshid, The change you have made won't remove any PagedLOD, it'll only remove the PagedLODs that are being tracked by the SetBasedPagedLODList object, effectively you are hiding the evidence of what is really going on and actually preventing proper cleanup so it'll introduce a bug in tracking and expiring subgraphs.
For you own tests I would recommend using much larger numbers of PagedLOD that are more representative of the what you'd use in practice. As PagedLOD are typically arranged with quad trees expiring a PagedLOD's children can knock out more PagedLOD's than just one so the actual increase/reduction of PagedLOD through the life of an application can't be expected to stick to single unit changes. Given this I don't believe it's realistic to expect to be achieve a specific maximum number of PagedLOD, instead you should see it as hint to what the pager should aim for. Robert. On 21 May 2013 18:25, Farshid Lashkari <[email protected]> wrote: > Hi Robert, > > As I mentioned on the users list, I am noticing that the DatabasePager over > shoots the number of children it expires relative to the target maximum > setting. > > The behavior seems to stem from SetBasedPagedLODList::removeExpiredChildren. > It appears to only remove nested PagedLODs from the active list, and will > never remove top level PagedLODs. I simply added a check to this function > that will remove the top level PagedLOD from the active list if the number > of children is less than or equal to the number of children that cannot be > expired. > > With this change, my test case of setting the target maximum to 3 and adding > 4 top level PagedLODs, will cause only one of the LODS to be removed instead > of all 4. However, I don't have much experience with PagedLODs so I'm not > sure whether this change is safe. I've attached the patch anyway. > > Cheers, > Farshid > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
