I gave that a shot, but it's still leaking - the trpgPageManager still marks everything not in the current view as unloaded, and re-adds it when the other view updates. The crux of the problem is that trpgPageManager keeps track of loaded tiles in a grid relative to the eyepoint - I took a shot at quickly patching it to handle multiple eyepoints, but avoiding loading the same tile twice would mean keeping a separate tile grid per eyepoint inside the pager, which I haven't had time to try.
On Fri, Jun 6, 2014 at 5:14 PM, Trajce Nikolov NICK < [email protected]> wrote: > Hi Max, > > I review the code of the txp loader just now and I might have a hint. > Internally as you might already know it uses the paging manager of the > trpage library. I see You understand the internals well. The paging Manager > from trpage is updating the scene graph based on the eye position, and then > internally is managed by PagedLOD. Try commenting the removeChild > (TXPNode.cpp Ln 345 in UpdateSceneGraph method) and let the DatabasePager > remove the child. This is by fast look on the code, but I think worth of > try. Give it a shot > > Nick > > > On Fri, Jun 6, 2014 at 7:46 PM, Max Bandazian <[email protected]> > wrote: > >> Thanks for the background. After playing with it some more, I'm still >> seeing leaks, and I think some more extensive changes will be needed to fix >> them (though I'm not sure what the best way to do it is). The main problem >> is that the TXPNode tests all of its tiles against the current eyepoint >> every time it's traversed and throws out tiles based on that, so with two >> views far away from each other it's throwing out and reloading the entire >> tile set every frame. I think it needs to be modified to use an expiration >> scheme like the DatabasePager does for its toplevel tiles, so that tiles in >> view of one eyepoint but not the other get marked and not thrown out. >> >> It's also leaking half the tiles every frame while this is going on, >> which I don't know the cause of yet. I wasn't seeing the problem before >> after removing the RetestCallback because I had my target paged LOD number >> set very high, but it does still leak (a lot) with a smaller paged LOD >> target (I'm testing with 100 now). >> >> Anyway, if I get it fixed up I'll certainly submit it. >> >> Thanks, >> Max >> >> >> On Fri, Jun 6, 2014 at 3:53 AM, Robert Osfield <[email protected]> >> wrote: >> >>> Hi Max, >>> >>> As Nick has given the green light to removing it could you post the >>> modified file to osg-submissions so I can review and merge it. >>> >>> Cheers, >>> Robert. >>> >>> On 5 June 2014 19:38, Max Bandazian <[email protected]> wrote: >>> > I'm getting a large memory leak when viewing a TerraPage file from >>> multiple >>> > viewpoints, and the cause appears to be the RetestCallback removing >>> nodes >>> > out from under the DatabasePager. Does anyone know what the purpose of >>> that >>> > thing is? It looks like it's supposed to time out tiles, but the >>> regular >>> > pager should also be doing that. If I remove it, everything seems to >>> work. >>> > >>> > Thanks, >>> > Max Bandazian >>> > >>> > _______________________________________________ >>> > 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 >>> >> >> >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> > > > -- > trajce nikolov nick > > _______________________________________________ > 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

