Skip to content

Commit

Permalink
cache pathExistence
Browse files Browse the repository at this point in the history
This commit caches the pathExistence of the data folder and user data
folder in order to avoid accessing the disk on every call of
`createConfigDirUri`. This should prevent possible performance
regressions.

Signed-off-by: Vlad Arama <[email protected]>
  • Loading branch information
vladarama authored and msujew committed Nov 16, 2023
1 parent da41923 commit 2a3c3e2
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export class EnvVariablesServerImpl implements EnvVariablesServer {
}
} else {
process.env.THEIA_CONFIG_DIR = join(homedir(), '.theia');
this.pathExistenceCache[process.env.THEIA_CONFIG_DIR] = true;
}
return FileUri.create(process.env.THEIA_CONFIG_DIR).toString();
}
Expand Down

0 comments on commit 2a3c3e2

Please sign in to comment.