feat: improve caches of calls and module exports type checking (#847)

* dev: optimize log on critical paths

* dev: optimize `check_module_item`

* dev: cache source queries

* dev: cache call checking

* dev: remove source cache
This commit is contained in:
Myriad-Dreamin 2024-11-18 17:20:05 +08:00 committed by GitHub
parent 256dd3b3a5
commit ccd3cea08c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 107 additions and 33 deletions

View file

@ -134,6 +134,21 @@ pub trait StatefulRequest {
) -> Option<Self::Response>;
}
/// Completely disabled log
#[macro_export]
macro_rules! log_never {
// debug!(target: "my_target", key1 = 42, key2 = true; "a {} event", "log")
// debug!(target: "my_target", "a {} event", "log")
(target: $target:expr, $($arg:tt)+) => {
let _ = format_args!($target, $($arg)+);
};
// debug!("a {} event", "log")
($($arg:tt)+) => {
let _ = format_args!($($arg)+);
};
}
#[allow(missing_docs)]
mod polymorphic {
use lsp_types::TextEdit;