From c4c3e2eabf44a0da6b92f0d5d675f5b146861f64 Mon Sep 17 00:00:00 2001 From: cocobo1 Date: Sun, 12 Oct 2025 16:01:14 +0300 Subject: [PATCH] feat(speed): potential speed increase? --- src/core/vendetta/plugins.ts | 2 +- src/lib/addons/plugins/index.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/vendetta/plugins.ts b/src/core/vendetta/plugins.ts index 4026b36..e8c065c 100644 --- a/src/core/vendetta/plugins.ts +++ b/src/core/vendetta/plugins.ts @@ -169,7 +169,7 @@ export const VdPluginManager = { if (!settings.safeMode?.enabled) { // Loop over any plugin that is enabled, update it if allowed, then start it. - await Promise.allSettled(allIds.filter(pl => plugins[pl].enabled).map(async pl => (plugins[pl].update && await this.fetchPlugin(pl).catch((e: Error) => logger.error(e.message)), await this.startPlugin(pl)))); + Promise.allSettled(allIds.filter(pl => plugins[pl].enabled).map(async pl => (plugins[pl].update && await this.fetchPlugin(pl).catch((e: Error) => logger.error(e.message)), await this.startPlugin(pl)))); // Wait for the above to finish, then update all disabled plugins that are allowed to. allIds.filter(pl => !plugins[pl].enabled && plugins[pl].update).forEach(pl => this.fetchPlugin(pl)); } diff --git a/src/lib/addons/plugins/index.ts b/src/lib/addons/plugins/index.ts index 2d4e9c1..5b8ee5e 100644 --- a/src/lib/addons/plugins/index.ts +++ b/src/lib/addons/plugins/index.ts @@ -380,19 +380,19 @@ export async function updatePlugins() { corePluginInstances.set(id, instance); } - await updateAllRepository(); + updateAllRepository(); } /** * @internal */ export async function initPlugins() { - await awaitStorage(pluginRepositories, pluginSettings); + awaitStorage(pluginRepositories, pluginSettings); // Now, start all enabled plugins... - await Promise.allSettled([...registeredPlugins.keys()].map(async id => { + Promise.allSettled([...registeredPlugins.keys()].map(async id => { if (isPluginEnabled(id)) { - await startPlugin(id); + startPlugin(id); } })); }