Skip to content

Commit 1e43eef

Browse files
galinilievCopilot
andcommitted
fix: clarify plugin load timing log and add changelog entry
Use an attempted-load counter so the debug timing message reflects all candidates the timer measured, not just successful registrations. Add changelog entry for the Windows native require fast path fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 873d948 commit 1e43eef

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ Docs: https://docs.openclaw.ai
315315
- Auth/device pairing: bound bootstrap handoff token issuance, redemption, and approved pairing baselines to the documented per-role scope allowlist, so bootstrap approvals cannot persistently grant `operator.admin`, `operator.pairing`, or `node.exec` scopes. Thanks @eleqtrizit.
316316
- Providers/GitHub Copilot: support the GUI/RPC wizard device-code auth flow so onboarding from non-TTY clients (gateway RPC bridge, GUI wizards) completes instead of returning empty profiles. Dangerous-state handling now distinguishes `access_denied` and `expired_token` from transport errors. (#73290) Thanks @indierawk2k2.
317317
- Installer/Linux: warn before switching an unwritable npm global prefix to `~/.npm-global`, then tell users to run future global updates with `npm i -g openclaw@latest` without `sudo` so npm keeps using the redirected user prefix. Fixes #44365; carries forward #50479. Thanks @Sayeem3051.
318+
- Gateway/plugins: enable the native `require()` fast path on Windows for bundled plugin modules so plugin loading uses `require()` instead of Jiti's transform pipeline, reducing startup from ~39s to ~2s on typical 6-plugin setups. Fixes #68656. (#74173) Thanks @galiniliev.
318319

319320
## 2026.4.27
320321

src/plugins/loader.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,7 @@ export function loadOpenClawPlugins(options: PluginLoadOptions = {}): PluginRegi
13171317
let memorySlotMatched = false;
13181318
const dreamingEngineId = resolveDreamingSidecarEngineId({ cfg, memorySlot });
13191319
const pluginLoadStartMs = performance.now();
1320+
let pluginLoadAttemptCount = 0;
13201321

13211322
for (const candidate of orderedCandidates) {
13221323
const manifestRecord = manifestByRoot.get(candidate.rootDir);
@@ -1703,7 +1704,8 @@ export function loadOpenClawPlugins(options: PluginLoadOptions = {}): PluginRegi
17031704
// Track the plugin as imported once module evaluation begins. Top-level
17041705
// code may have already executed even if evaluation later throws.
17051706
recordImportedPluginId(record.id);
1706-
logger.debug(`[plugins] loading ${record.id} from ${safeSource}`);
1707+
pluginLoadAttemptCount++;
1708+
logger.debug?.(`[plugins] loading ${record.id} from ${safeSource}`);
17071709
mod = withProfile(
17081710
{ pluginId: record.id, source: safeSource },
17091711
registrationMode,
@@ -2068,10 +2070,9 @@ export function loadOpenClawPlugins(options: PluginLoadOptions = {}): PluginRegi
20682070
}
20692071

20702072
const pluginLoadElapsedMs = performance.now() - pluginLoadStartMs;
2071-
const loadedCount = registry.plugins.length;
2072-
if (loadedCount > 0) {
2073-
logger.debug(
2074-
`[plugins] loaded ${loadedCount} plugin(s) in ${pluginLoadElapsedMs.toFixed(1)}ms`,
2073+
if (pluginLoadAttemptCount > 0) {
2074+
logger.debug?.(
2075+
`[plugins] loaded ${registry.plugins.length} plugin(s) (${pluginLoadAttemptCount} attempted) in ${pluginLoadElapsedMs.toFixed(1)}ms`,
20752076
);
20762077
}
20772078

0 commit comments

Comments
 (0)