Turn off full GC (#24545)
Using the full gc sometimes leads to an infinite recursion resulting in a browser freeze. This was noted as part of running Blazor's benchmarks. This is being addressed in rc1, in the meanwhile this reverts the behavior to 3.2 defaults. Browser freezes when using a Blazor WASM application. Yes. Full GC on is new to WASM on .NET Core Low. Off by default is the behavior we had in 3.2.
This commit is contained in:
parent
a78cd6239f
commit
fcabe6f0fd
File diff suppressed because one or more lines are too long
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue