src: project load performance
removed unused fields from StorageStats to improve project loading performance.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user