Skip to content

Commit 360bc6c

Browse files
authored
Refactor activate function to optimize directory read (#1280)
- 🔄 Moved portalsFS.readDirectory call to after ECS config initialization for better flow.
1 parent f828996 commit 360bc6c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/web/client/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
139139
title: vscode.l10n.t("Fetching your file ..."),
140140
},
141141
async () => {
142-
await portalsFS.readDirectory(WebExtensionContext.rootDirectory, true);
143-
144142
// Initialize ECS config in webExtensionContext
145143
await ECSFeaturesClient.init(
146144
{
@@ -152,6 +150,8 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
152150
Location: queryParamsMap.get(queryParameters.GEO) as string
153151
},
154152
PowerPagesClientName);
153+
154+
await portalsFS.readDirectory(WebExtensionContext.rootDirectory, true);
155155

156156
const { enableServerLogicChanges } = EnableServerLogicChanges.getConfig() as { enableServerLogicChanges?: boolean };
157157
if (!serverApiAutocompleteInitialized && enableServerLogicChanges) {

0 commit comments

Comments
 (0)