From 7a0cd0c8d758c67536a71afb9e6494328147ebf3 Mon Sep 17 00:00:00 2001 From: malte_langkabel Date: Thu, 7 Apr 2016 13:18:41 +0200 Subject: [PATCH] src: project load performance removed unused fields from StorageStats to improve project loading performance. --- src/lib/data/Storage.cpp | 16 ++++------------ src/lib/data/StorageStats.h | 9 --------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/src/lib/data/Storage.cpp b/src/lib/data/Storage.cpp index 069143fd..deb13a10 100644 --- a/src/lib/data/Storage.cpp +++ b/src/lib/data/Storage.cpp @@ -145,15 +145,13 @@ void Storage::logStats() const ss << "\t" << stats.nodeCount << " Nodes\n"; ss << "\t" << stats.edgeCount << " Edges\n"; - ss << "\nSearch:\n"; - ss << "\t" << stats.charCount << " Characters\n"; - ss << "\t" << stats.wordCount << " Words\n"; - ss << "\t" << stats.searchNodeCount << " SearchNodes\n"; - ss << "\nCode:\n"; ss << "\t" << stats.fileCount << " Files\n"; ss << "\t" << stats.fileLOCCount << " Lines of Code\n"; - ss << "\t" << stats.sourceLocationCount << " Source Locations\n"; + + ss << "\nErrors:\n"; + ss << "\t" << stats.errorCount.total << " Errors\n"; + ss << "\t" << stats.errorCount.fatal << " Fatal Errors\n"; LOG_WARNING(ss.str()); } @@ -682,14 +680,8 @@ StorageStats Storage::getStorageStats() const stats.nodeCount = m_sqliteStorage.getNodeCount(); stats.edgeCount = m_sqliteStorage.getEdgeCount(); - // Takes too much time - // stats.charCount = m_tokenIndex.getCharCount(); - // stats.wordCount = m_tokenIndex.getWordCount(); - // stats.searchNodeCount = m_tokenIndex.getNodeCount(); - stats.fileCount = m_sqliteStorage.getFileCount(); stats.fileLOCCount = m_sqliteStorage.getFileLOCCount(); - stats.sourceLocationCount = m_sqliteStorage.getSourceLocationCount(); stats.errorCount = getErrorCount(); diff --git a/src/lib/data/StorageStats.h b/src/lib/data/StorageStats.h index 81592759..e9c18efe 100644 --- a/src/lib/data/StorageStats.h +++ b/src/lib/data/StorageStats.h @@ -8,25 +8,16 @@ struct StorageStats StorageStats() : nodeCount(0) , edgeCount(0) - , charCount(0) - , wordCount(0) - , searchNodeCount(0) , fileCount(0) , fileLOCCount(0) - , sourceLocationCount(0) , errorCount(ErrorCountInfo()) {} size_t nodeCount; size_t edgeCount; - size_t charCount; - size_t wordCount; - size_t searchNodeCount; - size_t fileCount; size_t fileLOCCount; - size_t sourceLocationCount; ErrorCountInfo errorCount; };