LanguageClient: improve the performance of creating text marks

If we already know the document for a text mark we can save the lookup
in the documentModel. This improves the performance for the text mark
creation on windows by around 10%.

Change-Id: Iecf9cb2e9114ed026f5e354e75d279b54c0ce51d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2023-06-13 10:40:17 +02:00
parent e973257cbc
commit 3c2d545230
8 changed files with 34 additions and 19 deletions

View File

@@ -23,7 +23,7 @@ class ClangdClient;
class ClangdTextMark : public TextEditor::TextMark
{
public:
ClangdTextMark(const ::Utils::FilePath &filePath,
ClangdTextMark(TextEditor::TextDocument *doc,
const LanguageServerProtocol::Diagnostic &diagnostic,
bool isProjectFile,
ClangdClient *client);