Improved DatabaseViewer memory usage (by not keeping uncompressed data in cache)

This commit is contained in:
matlabbe
2015-10-14 11:02:36 -04:00
parent a8d83c895c
commit 9bd649009c
5 changed files with 37 additions and 20 deletions

View File

@@ -239,6 +239,7 @@ void Optimizer::getConnectedGraph(
std::multimap<int, int> biLinks;
for(std::multimap<int, Link>::const_iterator iter=linksIn.begin(); iter!=linksIn.end(); ++iter)
{
UASSERT_MSG(findLink(biLinks, iter->second.from(), iter->second.to()) == biLinks.end(), "Input links should be unique between two poses.");
biLinks.insert(std::make_pair(iter->second.from(), iter->second.to()));
biLinks.insert(std::make_pair(iter->second.to(), iter->second.from()));
}
@@ -262,7 +263,7 @@ void Optimizer::getConnectedGraph(
{
nextDepth.insert(nextId);
std::map<int, Link>::const_iterator kter = graph::findLink(linksIn, *jter, nextId);
std::multimap<int, Link>::const_iterator kter = graph::findLink(linksIn, *jter, nextId);
if(depth == 0 || d < depth-1)
{
linksOut.insert(*kter);