Log AutoImportProvider creation time (#41315)

This commit is contained in:
Andrew Branch 2020-10-29 09:00:50 -07:00 committed by GitHub
parent f3ce688a94
commit 6428140204
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1703,9 +1703,11 @@ namespace ts.server {
const dependencySelection = this.includePackageJsonAutoImports();
if (dependencySelection) {
const start = timestamp();
this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.getModuleResolutionHostForAutoImportProvider(), this.documentRegistry);
if (this.autoImportProviderHost) {
updateProjectIfDirty(this.autoImportProviderHost);
this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider", timestamp() - start);
return this.autoImportProviderHost.getCurrentProgram();
}
}