Cache glob resolutions in import graph (#13413)

## Summary

These are often repeated; caching the resolutions can have a huge
impact.
This commit is contained in:
Charlie Marsh 2024-09-19 22:24:06 -04:00 committed by GitHub
parent 4e935f7d7d
commit 770b276c21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 88 additions and 37 deletions

View file

@ -26,6 +26,11 @@ impl ModuleImports {
self.0.insert(path);
}
/// Extend the module imports with additional file paths.
pub fn extend(&mut self, paths: impl IntoIterator<Item = SystemPathBuf>) {
self.0.extend(paths);
}
/// Returns `true` if the module imports are empty.
pub fn is_empty(&self) -> bool {
self.0.is_empty()