Uno.Wasm.Bootstrap/doc/features-prefetch.md

1.2 KiB

Support for Content prefetching

The WashShellGeneratePrefetchHeaders controls the generation of <link rel="prefetch" /> nodes in the index.html header.

It is enabled by default and allows for the browser to efficiently fetch the applications webassembly and .NET assemblies files, while the JavaScript and WebAssembly runtimes are being initialized.

This prefetching feature is particularly useful if the http server supports HTTP/2.0.

Environment variables

Mono provides the ability to configure some features at initialization, such as logging or GC.

To set those variables, add the following to your project file:

<ItemGroup>
  <WasmShellMonoEnvironment Include="MONO_GC_PARAMS" Value="soft-heap-limit=512m,nursery-size=64m,evacuation-threshold=66,major=marksweep" />
  <WasmShellMonoEnvironment Include="MONO_LOG_LEVEL" Value="debug" />
  <WasmShellMonoEnvironment Include="MONO_LOG_MASK" Value="gc" />
</ItemGroup>

These lines change the configuration of the GC and logging, to determine when a GC occurs. More options are available in the Environment Variables section of the mono documentation.