data: increased project load and codeview performance

* rewrote searchnode to use map
* added local cache for parent node ids when creating the Hierarchy Cache.
* added indices to SqliteStorage to increase code view performance.
This commit is contained in:
malte_langkabel
2016-03-14 12:32:01 +01:00
parent 53d5fe6a06
commit f82da323b3
8 changed files with 85 additions and 32 deletions
+5 -1
View File
@@ -1083,9 +1083,13 @@ void Storage::buildHierarchyCache()
{
std::vector<StorageEdge> memberEdges = m_sqliteStorage.getEdgesByType(Edge::typeToInt(Edge::EDGE_MEMBER));
Cache<Id, Node::NodeType> nodeTypeCache([this](Id id){
return Node::intToType(m_sqliteStorage.getNodeById(id).type);
});
for (const StorageEdge& edge : memberEdges)
{
bool isVisible = !(Node::intToType(m_sqliteStorage.getNodeById(edge.sourceNodeId).type) & Node::NODE_NOT_VISIBLE);
bool isVisible = !(nodeTypeCache.getValue(edge.sourceNodeId) & Node::NODE_NOT_VISIBLE);
m_hierarchyCache.createConnection(edge.id, edge.sourceNodeId, edge.targetNodeId, isVisible);
}
}