feat(speed): potential speed increase?
This commit is contained in:
parent
17752879b9
commit
c4c3e2eabf
2 changed files with 5 additions and 5 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue