Skip to content

Commit e6b9516

Browse files
committed
Optimize
1 parent 7c0dc63 commit e6b9516

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

denops/ddu/loader.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -295,16 +295,14 @@ async function createPathCache(
295295
denops: Denops,
296296
runtimepath: string,
297297
): Promise<Map<string, string>> {
298-
const extFileGlob = await globpath(
299-
denops,
300-
runtimepath,
301-
`${TYPE_DIR_PATTERN}/*.ts`,
302-
);
303-
const extDirEntryPointGlob = await globpath(
304-
denops,
305-
runtimepath,
306-
`${TYPE_DIR_PATTERN}/*/${EXT_ENTRY_POINT_FILE}`,
307-
);
298+
const [extFileGlob, extDirEntryPointGlob] = await Promise.all([
299+
globpath(denops, runtimepath, `${TYPE_DIR_PATTERN}/*.ts`),
300+
globpath(
301+
denops,
302+
runtimepath,
303+
`${TYPE_DIR_PATTERN}/*/${EXT_ENTRY_POINT_FILE}`,
304+
),
305+
]);
308306

309307
// Create key paths for both single-file and directory entry points.
310308
// Prioritize the first occurrence key in keyPaths.

0 commit comments

Comments
 (0)