1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-08 06:47:34 +00:00
serenity/Userland/DevTools/HackStudio/LanguageServers/Cpp
Itamar 5c19a48b95 CppLanguageServer: Cache declarations from headers in every document
Previously, to get the globally available declarations in a document
(including declarations from headers), we would have to recursively
walk the #include tree and get the declarations of each included
document.

To improve upon this, we now store a HashTable of globally available
declaration from included header files in each document, and populate
it when we first process the document.

Before this, invoking simple autocomplete actions in code documents
that had a very large #include tree (e.g when <LibGUI/Widget.h> was
included) hang the CppLanguageServer process and used 100% CPU until
the process ran out of memory.

Now, the autocomplete request in that situation returns immediately :^)
2021-05-09 20:58:27 +02:00
..
ClientConnection.h Userland: Change IPC funcs to use plain arguments instead of a struct 2021-05-03 21:14:06 +02:00
CMakeLists.txt HackStudio/LanguageServers: Move some components out of Cpp 2021-03-04 11:21:43 +01:00
LexerAutoComplete.cpp Everywhere: Turn #if *_DEBUG into dbgln_if/if constexpr 2021-05-01 21:25:06 +02:00
LexerAutoComplete.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
main.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ParserAutoComplete.cpp CppLanguageServer: Cache declarations from headers in every document 2021-05-09 20:58:27 +02:00
ParserAutoComplete.h CppLanguageServer: Cache declarations from headers in every document 2021-05-09 20:58:27 +02:00