Index: src/analyze/gui/locationdata.h =================================================================== --- src/analyze/gui/locationdata.h +++ src/analyze/gui/locationdata.h @@ -69,6 +69,13 @@ return symbolId > 0; } + struct FullEqual { + bool operator()(const Symbol &lhs, const Symbol &rhs) const { + return lhs.symbol == rhs.symbol && + lhs.binary == rhs.binary && + lhs.path == rhs.path; + } + }; struct FullLessThan { bool operator()(const Symbol &lhs, const Symbol &rhs) const { return std::tie(lhs.symbol, lhs.binary, lhs.path) < std::tie(rhs.symbol, rhs.binary, rhs.path); Index: src/analyze/gui/parser.cpp =================================================================== --- src/analyze/gui/parser.cpp +++ src/analyze/gui/parser.cpp @@ -28,9 +28,23 @@ #include #include #include +#include using namespace std; +// Only use this hash when filling in the cache +struct CacheSymbolHash +{ + std::size_t operator()(const Symbol &symbol) const noexcept + { + size_t seed = 0; + boost::hash_combine(seed, std::hash{}(symbol.symbol)); + boost::hash_combine(seed, std::hash{}(symbol.binary)); + boost::hash_combine(seed, std::hash{}(symbol.path)); + return seed; + } +}; + namespace { struct Location @@ -93,7 +107,7 @@ // interned module basenames mutable QHash m_pathToBinaries; // existing symbols - mutable std::map m_symbols; + mutable std::unordered_map m_symbols; bool diffMode = false;