data: increased parse and graph assembly performance
* removed header search in subdirectories of header search paths * cache file node ids in Storage for faster lookup * retrieve node names from SearchIndex * fixed addNodeAndAllChildren also called for member edges * added check if node already present in addEdgeAndAllChildren
This commit is contained in:
@@ -35,6 +35,7 @@ void SearchIndex::clear()
|
||||
{
|
||||
m_root.m_nodes.clear();
|
||||
m_dictionary.clear();
|
||||
m_tokenIds.clear();
|
||||
}
|
||||
|
||||
size_t SearchIndex::getNodeCount() const
|
||||
@@ -134,6 +135,25 @@ bool SearchIndex::removeNodeIfUnreferencedRecursive(SearchNode* searchNode)
|
||||
return false;
|
||||
}
|
||||
|
||||
void SearchIndex::addTokenId(SearchNode* node, Id tokenId)
|
||||
{
|
||||
node->addTokenId(tokenId);
|
||||
m_tokenIds.emplace(tokenId, node);
|
||||
}
|
||||
|
||||
NameHierarchy SearchIndex::getNameHierarchyForTokenId(Id tokenId) const
|
||||
{
|
||||
std::map<Id, SearchNode*>::const_iterator it = m_tokenIds.find(tokenId);
|
||||
|
||||
if (it != m_tokenIds.end())
|
||||
{
|
||||
SearchNode* node = it->second;
|
||||
return node->getNameHierarchy();
|
||||
}
|
||||
|
||||
return NameHierarchy();
|
||||
}
|
||||
|
||||
SearchResults SearchIndex::runFuzzySearch(const std::string& query) const
|
||||
{
|
||||
return m_root.runFuzzySearch(query);
|
||||
|
||||
Reference in New Issue
Block a user