mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-16 06:13:09 +00:00
Increase worker initailization timeout from 5=>20s to prevent worker timeout, add duration logging to some longer operations
This commit is contained in:
@@ -51,6 +51,7 @@ export class FetchGameMapLoader implements GameMapLoader {
|
||||
}
|
||||
|
||||
private async loadBinaryFromUrl(url: string) {
|
||||
const startTime = performance.now();
|
||||
const response = await fetch(url);
|
||||
|
||||
if (!response.ok) {
|
||||
@@ -58,6 +59,9 @@ export class FetchGameMapLoader implements GameMapLoader {
|
||||
}
|
||||
|
||||
const data = await response.arrayBuffer();
|
||||
console.log(
|
||||
`[MapLoader] ${url}: ${(performance.now() - startTime).toFixed(0)}ms`,
|
||||
);
|
||||
return new Uint8Array(data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user