perf: parse source files in parallel (#23858)

This commit is contained in:
David Sherret 2024-05-28 16:23:11 -04:00 committed by GitHub
parent 3e8f29ae41
commit 57617af16a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 10 deletions

View file

@ -470,8 +470,9 @@ impl ModuleGraphBuilder {
}
let maybe_imports = self.options.to_maybe_imports()?;
let parser = self.parsed_source_cache.as_capturing_parser();
let analyzer = self.module_info_cache.as_module_analyzer(&parser);
let analyzer = self
.module_info_cache
.as_module_analyzer(&self.parsed_source_cache);
let mut loader = match options.loader {
Some(loader) => MutLoaderRef::Borrowed(loader),
None => MutLoaderRef::Owned(self.create_graph_loader()),