Make reporter faster
This commit is contained in:
parent
f5be78d101
commit
8e9434cdd5
|
@ -440,10 +440,13 @@ async function runtime(token: string) {
|
||||||
wreq = webpackRequire;
|
wreq = webpackRequire;
|
||||||
|
|
||||||
Vencord.Webpack.factoryListeners.add(factory => {
|
Vencord.Webpack.factoryListeners.add(factory => {
|
||||||
let isResolved = false;
|
// setImmediate to avoid blocking the factory patching execution while checking for lazy chunks
|
||||||
searchAndLoadLazyChunks(String(factory)).then(() => isResolved = true);
|
setTimeout(() => {
|
||||||
|
let isResolved = false;
|
||||||
|
searchAndLoadLazyChunks(String(factory)).then(() => isResolved = true);
|
||||||
|
|
||||||
chunksSearchPromises.push(() => isResolved);
|
chunksSearchPromises.push(() => isResolved);
|
||||||
|
}, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
// setImmediate to only search the initial factories after Discord initialized the app
|
// setImmediate to only search the initial factories after Discord initialized the app
|
||||||
|
|
Loading…
Reference in a new issue