logic: search ui performance optimization

* replaced the implementation of the search index. the search index now uses a search-trie. edges have gates that can be used to check if a character can be matched when following the edge.
* SearchMatches now have a text and a list of NameHierarchies that share this node (instead of Ids, so that nodes must be found by names (which makes sure that SearchMatches are still valid after refresh).
* when parsing a project's description the CodeController now looks for NameHierarchies instead of SearchNode names to find ids of linked elements.
This commit is contained in:
malte_langkabel
2016-04-04 15:39:39 +02:00
parent ffc00829f0
commit f3dc12b0ed
21 changed files with 410 additions and 1367 deletions
+10
View File
@@ -5,6 +5,7 @@
#include <deque>
#include <set>
#include <time.h>
#include <unordered_set>
#include "boost/date_time/posix_time/posix_time.hpp"
@@ -30,6 +31,9 @@ namespace utility
template<typename T>
void append(std::set<T>& a, const std::set<T>& b);
template<typename T>
void append(std::unordered_set<T>& a, const std::unordered_set<T>& b);
template<typename T>
std::vector<T> toVector(const std::deque<T>& d);
@@ -76,6 +80,12 @@ void utility::append(std::set<T>& a, const std::set<T>& b)
a.insert(b.begin(), b.end());
}
template<typename T>
void utility::append(std::unordered_set<T>& a, const std::unordered_set<T>& b)
{
a.insert(b.begin(), b.end());
}
template<typename T>
std::vector<T> utility::toVector(const std::deque<T>& d)
{