diff --git a/core/indexing/walkDir.ts b/core/indexing/walkDir.ts index 757163d96..d876425b3 100644 --- a/core/indexing/walkDir.ts +++ b/core/indexing/walkDir.ts @@ -157,6 +157,17 @@ const defaultOptions: WalkerOptions = { returnRelativeUrisPaths: false, }; +export async function* walkDirAsync( + path: string, + ide: IDE, + _optionOverrides?: WalkerOptions, +): AsyncGenerator { + const start = Date.now(); + const options = { ...defaultOptions, ..._optionOverrides }; + yield* new DFSWalker(path, ide, options).walk(); + console.log(`walkDir took ${Date.now() - start}ms`); +} + export async function walkDir( uri: string, ide: IDE, @@ -169,15 +180,6 @@ export async function walkDir( return urisOrRelativePaths; } -export async function* walkDirAsync( - path: string, - ide: IDE, - _optionOverrides?: WalkerOptions, -): AsyncGenerator { - const options = { ...defaultOptions, ..._optionOverrides }; - yield* new DFSWalker(path, ide, options).walk(); -} - export async function walkDirs( ide: IDE, _optionOverrides?: WalkerOptions,