-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 9.0.0, Qt Creator 13.0.0
-
None
-
6a8f7ae53 (master)
Clangd utilizes CPU too much when saving a single C++ file. Looks like it's scanning all open files instead of saved file(s). When only a single file is open, CPU overhead is low, but opening many files and saving only one of them utilizes CPU too much.
Is it really needed to trigger clangd when saving file? It's already working while editing a file.
—
Steps to reproduce:
1. Launch QtCreator 13 with this command:
QT_LOGGING_RULES="qtc.languageclient.messages.debug=true" qtcreator
2. Open attached clangd_many_files.zip
project.
3. Open all files (double click on every CPP file in QtCreator).
4. Modify one file (e.g. main.cpp).
5. Save main.cpp file.
Actual result: Clangd updates all open files (see logs).
Expected result: Clangd doesn't do anything, because it do updates automatically when writing code.
If it's necessary, maybe just add an option in "Clangd" tab to not scan anything on file save action?
| For Gerrit Dashboard: QTCREATORBUG-28580 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 560783,2 | LanguageClient: Let clients opt out of sending the didSave message | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |