Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/Cache/
PathCanon.rs

1//! Process-wide canonical-path cache.
2//!
3//! Keyed by lexical input path; value is the result of `dunce::canonicalize`.
4//! Hits skip the syscall; misses run it and cache the result.
5//!
6//! The fs-scope security gate (`Environment::Utility::PathSecurity`)
7//! canonicalises every incoming path on every call. The same paths recur
8//! thousands of times during boot - 113 extension manifest paths, ~80 chunked
9//! workbench JS imports, ~60 git-extension scope checks, every
10//! `vscode-file://` request - so collapsing repeats to a hash lookup saves
11//! ~150 ms cumulative on the boot path.
12//!
13//! TimeToLive = 60 s to bound staleness against external `mv`/rename. moka's
14//! `time_to_idle` resets on each access, so hot paths stay cached
15//! indefinitely while one-shot paths evict naturally.
16
17pub mod CacheStats;
18
19pub mod Canonicalize;
20
21pub mod CanonicalizeUncached;
22
23pub mod Clear;
24
25pub mod Invalidate;
26
27pub mod SpawnDiagnosticLogger;
28
29pub mod Stats;
30
31pub(crate) mod Cache;