From 57745e9f75dbae558a8c1a878ac4173e0c551e14 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Thu, 15 Apr 2021 14:25:54 -0500 Subject: [PATCH] disable on_demand_gc until AOT issues are identified --- src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts index 6e1ce8eac1a9..f6e6bc2394f4 100644 --- a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts +++ b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts @@ -427,7 +427,9 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone; } catch { } MONO.mono_wasm_setenv("TZ", timeZone || 'UTC'); - + // 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); if (resourceLoader.bootConfig.modifiableAssemblies) { // Configure the app to enable hot reload in Development. MONO.mono_wasm_setenv('DOTNET_MODIFIABLE_ASSEMBLIES', resourceLoader.bootConfig.modifiableAssemblies);