forked from qt-creator/qt-creator
Clang: Reduce database accesses
If we prefetch data from the database to the caches we reduce the database transaction calls which are quite expensive. Change-Id: I617a0d886807402e0a94291a913a77f989970b55 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -57,7 +57,7 @@ public:
|
||||
, m_database(database)
|
||||
{}
|
||||
|
||||
void addOrUpdateTasks(std::vector<SymbolIndexerTask> &&tasks)
|
||||
void addOrUpdateTasks(std::vector<SymbolIndexerTask> &&tasks) override
|
||||
{
|
||||
auto merge = [] (SymbolIndexerTask &&first, SymbolIndexerTask &&second) {
|
||||
first.callable = std::move(second.callable);
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
|
||||
m_progressCounter.addTotal(int(m_tasks.size() - oldSize));
|
||||
}
|
||||
void removeTasks(const std::vector<int> &projectPartIds)
|
||||
void removeTasks(const ProjectPartIds &projectPartIds) override
|
||||
{
|
||||
auto shouldBeRemoved = [&] (const SymbolIndexerTask& task) {
|
||||
return std::binary_search(projectPartIds.begin(), projectPartIds.end(), task.projectPartId);
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
return m_tasks;
|
||||
}
|
||||
|
||||
void processEntries()
|
||||
void processEntries() override
|
||||
{
|
||||
auto slotUsage = m_symbolIndexerScheduler.slotUsage();
|
||||
uint taskCount = slotUsage.free;
|
||||
|
||||
Reference in New Issue
Block a user