forked from qt-creator/qt-creator
ClangCodeModel: Limit result count in clangd-based locator searches
clangd memory usage explodes when the workspace/symbol result count hits the six-digit mark, so prevent that. Change-Id: Iefc2eeb3da7fe541e2b1d3105818126980fc3323 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -43,6 +43,8 @@
|
||||
namespace ClangCodeModel {
|
||||
namespace Internal {
|
||||
|
||||
const int MaxResultCount = 10000;
|
||||
|
||||
class CppLocatorFilter : public CppTools::CppLocatorFilter
|
||||
{
|
||||
public:
|
||||
@@ -67,6 +69,7 @@ public:
|
||||
setDefaultShortcutString({});
|
||||
setEnabled(false);
|
||||
setHidden(true);
|
||||
setMaxResultCount(MaxResultCount);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -94,6 +97,7 @@ public:
|
||||
setDefaultShortcutString({});
|
||||
setEnabled(false);
|
||||
setHidden(true);
|
||||
setMaxResultCount(MaxResultCount);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -121,6 +125,7 @@ public:
|
||||
setDefaultShortcutString({});
|
||||
setEnabled(false);
|
||||
setHidden(true);
|
||||
setMaxResultCount(MaxResultCount);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user