Skip to content

Commit

Permalink
[release/8.0-staging] [browser][fix] maxParallelDownloads (#95870)
Browse files Browse the repository at this point in the history
* fix #95491

* Remove change to sample

---------

Co-authored-by: pavelsavara <[email protected]>
Co-authored-by: Larry Ewing <[email protected]>
  • Loading branch information
3 people authored Dec 19, 2023
1 parent cf49360 commit a9dcde8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/mono/wasm/runtime/loader/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ export function resolve_single_asset_path(behavior: SingleAssetBehaviors): Asset

export async function mono_download_assets(): Promise<void> {
mono_log_debug("mono_download_assets");
loaderHelpers.maxParallelDownloads = loaderHelpers.config.maxParallelDownloads || loaderHelpers.maxParallelDownloads;
loaderHelpers.enableDownloadRetry = loaderHelpers.config.enableDownloadRetry || loaderHelpers.enableDownloadRetry;
try {
const promises_of_assets: Promise<AssetEntryInternal>[] = [];

Expand Down
3 changes: 3 additions & 0 deletions src/mono/wasm/runtime/loader/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ export function normalizeConfig() {
runtimeHelpers.enablePerfMeasure = !!config.browserProfilerOptions
&& globalThis.performance
&& typeof globalThis.performance.measure === "function";

loaderHelpers.maxParallelDownloads = config.maxParallelDownloads || loaderHelpers.maxParallelDownloads;
loaderHelpers.enableDownloadRetry = config.enableDownloadRetry !== undefined ? config.enableDownloadRetry : loaderHelpers.enableDownloadRetry;
}

let configLoaded = false;
Expand Down

0 comments on commit a9dcde8

Please sign in to comment.