mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 10:00:23 +08:00
Fixed long loading time of large working memory
This commit is contained in:
@@ -238,8 +238,14 @@ void Memory::loadDataFromDb(bool postInitClosingEvents)
|
|||||||
// global loop closures.
|
// global loop closures.
|
||||||
_signatures.insert(std::pair<int, Signature *>((*iter)->id(), *iter));
|
_signatures.insert(std::pair<int, Signature *>((*iter)->id(), *iter));
|
||||||
_workingMem.insert(std::make_pair((*iter)->id(), UTimer::now()));
|
_workingMem.insert(std::make_pair((*iter)->id(), UTimer::now()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
delete *iter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//update odomMaxInf vector
|
UDEBUG("update odomMaxInf vector");
|
||||||
std::multimap<int, Link> links = this->getAllLinks(true, true);
|
std::multimap<int, Link> links = this->getAllLinks(true, true);
|
||||||
for(std::multimap<int, Link>::iterator iter=links.begin(); iter!=links.end(); ++iter)
|
for(std::multimap<int, Link>::iterator iter=links.begin(); iter!=links.end(); ++iter)
|
||||||
{
|
{
|
||||||
@@ -261,12 +267,8 @@ void Memory::loadDataFromDb(bool postInitClosingEvents)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
UDEBUG("update odomMaxInf vector, done!");
|
||||||
else
|
|
||||||
{
|
|
||||||
delete *iter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(postInitClosingEvents) UEventsManager::post(new RtabmapEventInit(std::string("Loading nodes to WM, done! (") + uNumber2Str(int(_workingMem.size() + _stMem.size())) + " loaded)"));
|
if(postInitClosingEvents) UEventsManager::post(new RtabmapEventInit(std::string("Loading nodes to WM, done! (") + uNumber2Str(int(_workingMem.size() + _stMem.size())) + " loaded)"));
|
||||||
|
|
||||||
// Assign the last signature
|
// Assign the last signature
|
||||||
|
|||||||
Reference in New Issue
Block a user