Repository navigation
NetWasm.UI 0.9.0
NetWasm 0.13.0 with its NetWasmGC collector, and the first per-row speedups from the profile in
#2, contributed by @zion-sati. The demo app's
Wasm drops from 108 to 92 KB (Brotli), and allocation-heavy work is up to 2× faster. See
Benchmarks.
Upgrading: set "NetWasm.Sdk": "0.13.0" under msbuild-sdks in your global.json, and any
NetWasm.System.* packages to 0.13.0. To use NetWasmGC like the template does, add
<NetWasmGarbageCollector>NetWasm</NetWasmGarbageCollector> to your app's project file.
Added
TemplateInstance.With(hole, content)overloads for one, two and three pieces of content, so the
common case allocates noparamsarray. Existing code, including the generated.nwui
templates, picks them up when it is rebuilt.benchmarks/Runner --gc NetWasm,Compactadds the Oz app built with each named NetWasm collector,
so a run compares collectors side by side.
Changed
- NetWasm.Sdk 0.13.0 (was 0.12.2). The Counter sample's Wasm is 17% smaller (Brotli, at
Oz, with
the same collector). - The template, the samples, the site and the benchmark app use NetWasm's NetWasmGC collector
(<NetWasmGarbageCollector>NetWasm</NetWasmGarbageCollector>): it allocates small objects inline
and collects faster than the default Compact collector, for about 1.6 KB more download. An app
that removes the property keeps Compact. - NetWasm 0.13.0 programs no longer carry type names, so
GetType().Namereadstype#<id>unless
NetWasmTypeNameswrites the names beside the program (on in Debug). NetWasm.UI does not read
type names. nwui.domkeeps the page's nodes in an array indexed by node id instead of aMap, and the
renderer reuses the ids of released nodes (a template clone reuses a released block of its size),
so the array stays dense in a long-running app. A node handle used after its scope disposed it
now reaches whichever node reuses the id rather than failing; as before, such use is a bug.Node.Dispose()andTemplateInstance.Dispose()release their ids at most once, so disposing
twice cannot hand one id to two live nodes. Disposing a template-hole handle (Root,
Element(hole)) does nothing; itsTemplateInstancereleases it.- Counter size budget tightened to 96 KiB Wasm / 144 KiB total (Brotli).