mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Use updateGraphIfDirty to do quick check if project update is needed
With this updateGraph is used only in locations we are certain project is dirty
This commit is contained in:
@@ -695,7 +695,7 @@ namespace ts.server {
|
||||
const { fileName, project } = checkList[index];
|
||||
index++;
|
||||
// Ensure the project is upto date before checking if this file is present in the project
|
||||
project.updateGraph();
|
||||
updateProjectIfDirty(project);
|
||||
if (!project.containsFile(fileName, requireOpen)) {
|
||||
return;
|
||||
}
|
||||
@@ -1084,7 +1084,7 @@ namespace ts.server {
|
||||
|
||||
private getProjectInfoWorker(uncheckedFileName: string, projectFileName: string | undefined, needFileNameList: boolean, excludeConfigFiles: boolean) {
|
||||
const { project } = this.getFileAndProjectWorker(uncheckedFileName, projectFileName);
|
||||
project.updateGraph();
|
||||
updateProjectIfDirty(project);
|
||||
const projectInfo = {
|
||||
configFileName: project.getProjectName(),
|
||||
languageServiceDisabled: !project.languageServiceEnabled,
|
||||
|
||||
Reference in New Issue
Block a user