diff --git a/src/Components/Web.JS/dist/Release/blazor.webassembly.js b/src/Components/Web.JS/dist/Release/blazor.webassembly.js index caaa8d8a97e69abecef59466f8f1107d50e1f39c..cd99a3089a22c368fc35f4e72cab4227fa267207 100644 Binary files a/src/Components/Web.JS/dist/Release/blazor.webassembly.js and b/src/Components/Web.JS/dist/Release/blazor.webassembly.js differ diff --git a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts index 3b906b00a1f24a4a0f0d193df82b7862b35b254f..d2abd2a70edf03bccae334316b6bc7c23694b87e 100644 --- a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts +++ b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts @@ -363,6 +363,11 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade resourceLoader.purgeUnusedCacheEntriesAsync(); // Don't await - it's fine to run in background MONO.mono_wasm_setenv("MONO_URI_DOTNETRELATIVEORABSOLUTE", "true"); + + // Turn off full-gc to prevent browser freezing. + const mono_wasm_enable_on_demand_gc = cwrap('mono_wasm_enable_on_demand_gc', null, ['number']); + mono_wasm_enable_on_demand_gc(0); + const load_runtime = cwrap('mono_wasm_load_runtime', null, ['string', 'number']); // -1 enables debugging with logging disabled. 0 disables debugging entirely. load_runtime(appBinDirName, hasDebuggingEnabled() ? -1 : 0);