Every year Stephen Toub publishes a post about performance improvements in .NET that is longer than most novels. It is an impressive feat and it always amazes me how many improvements are packed into each .NET release. I'll admit I mostly skim them, but even a skim is enough to see how much work goes into making a platform faster, and that's why I wanted to try doing something similar for Uno Platform 7.0. If any of our releases deserves that treatment, it is this one. Uno Platform 7.0 is the first release where every target renders through one shared managed rendering pipeline, on Skia or the new WebGPU backend, the first one where we allowed ourselves fundamental breaking changes in the core and the first one where we put performance optimization front and center. In 149 days of development, 7.0 took 5,219 commits, twice as many as our previous record, Uno Platform 5.0, with 2,616. 151 of those commits are typed perf:, and along the way we closed 704 issues. I went through all of the commits, picked the ones that change how fast your app runs, how much memory it uses or how much it downloads, and measured them against 6.7 on the same machine and the same .NET runtime, so the numbers show what Uno Platform changed rather than what .NET did.
The format is shamelessly borrowed: a pull request, the problem it solves from first principles, a benchmark you can run yourself, and the numbers. It's long. Grab a coffee (or two), read it in pieces, jump around with the headings. Here are a few highlights:
| Area | Headline |
|---|---|
| Property system | new Border() 18x faster, new SolidColorBrush() 37x, DataContext through brushes 2.7x, a templated control entering the tree allocates 93% less |
| Layout and the visual tree | nested Borders attach 3.3x faster with 94% less garbage; ItemsRepeater scroll step 2.9x faster; wide-panel walk 510x |
| Text | short labels 3.4-3.7x faster to measure, mixed script 4.1x, re-arranging a centered label 7x |
| Rendering and scrolling | 600 labels moving or changing color: 2-4 fps on 6.7, 115-119 fps on 7.0; scrolling a 2,837-Button list costs 7x less CPU than 6.7; draw per frame 4.9x cheaper than the 7.0 previews and below 6.5 (PR numbers); mouse-wheel inertia shows a new position on 120 frames per second instead of 55 (PR numbers) |
| Startup | default Win32 app reaches its first frame 4% sooner, allocating 5.5 MB instead of 7.7 MB, zero GCs |
| WebAssembly | Skia to Skia: new Border() 8.9x, DataContext 1.9x, text 2x, first frame 7% sooner; brotli +5% |
| Packages and restores | Uno.WinUI package 103.7 → 18.9 MB; Release restore 35-59% lighter on every head; blank desktop app without WebView publishes 9% smaller |
| WebGPU | new opt-in backend: 600 rotated text runs at 120 fps on 22% CPU where Skia manages 12 fps |
Benchmarking setup
If you've read Toub's posts, you know the drill: make a console app, reference BenchmarkDotNet, and run dotnet run -c Release -f net10.0 --filter "*" --runtimes net10.0 net11.0. That trick swaps runtimes. We need to swap a framework on the same runtime, and our code wants a UI thread and a host, so the drill needs two changes.
First, the benchmarks live inside a real Uno Platform app instead of a console app. A console app referencing Uno.WinUI gets reference assemblies; the real per-platform builds are picked by Uno.Sdk, and 7.0 also wires the drawing backend (fonts, geometry, codecs) through the host builder. So I created a blank desktop app (net10.0-desktop), added BenchmarkDotNet 0.15.8, and built it twice, from one source. The only differences between the two copies are global.json and the Uno Platform version:
- Before: 6.7.135 (Uno.Sdk 6.7.30), the current stable when this started. For brevity, the rest of the post calls this build simply “6.7”.
- After: 7.0.65 (
Uno.Sdk 7.0.22), the current 7.0 stable release. The rest of the post calls this simply “7.0”. - Both on .NET 10.0.14, Release, Windows (Win32 host).
- Reading the tables: a bold row marks a standout result (at least 4x faster, or at least 80% less memory or size; where nothing in a table clears that bar, its best result), and a small letter like a ties a number in the text to the cell it comes from.
Second, the UI thread. UI objects belong on it, while BenchmarkDotNet's in-process toolchain runs the workload on a thread of its own. So every benchmark hands a batch of N operations to the UI thread through a pair of spinning events (Ui.Invoke), and the ~2.5 μs handoff amortizes to ~2.5 ns per operation, which I measure on every run and don't subtract, so the biggest ratios below (an 18 ns brush, a 4 ns tree walk) are, if anything, conservative. Between batches the UI thread goes back to its dispatcher, so work the measured code defers (finalizer callbacks, queued updates) runs and gets counted, as in your app. Live-tree benchmarks attach to a Collapsed host, so elements are loaded but never rendered. Here's the skeleton; every benchmark in this post is a drop-in for the body, and I'll only show the interesting part from now on:
The runner launches each side as a separate process, three rounds, interleaved (6.7, 7.0, null, 6.7, 7.0, null...), and merges the results into the familiar table shape, with 6.7 as the 1.00 baseline.
The null test. The third side, null70, is an identical 7.0 build in a second directory. If 7.0 and its own twin disagree, the difference is noise, not Uno. They agreed within 5% on 48 of 62 benchmarks (median 2%) and up to ~12% on the Grid layout pass and the brush constructors, so I don't claim time differences smaller than that, and I lean on allocations, which are exact.
What BenchmarkDotNet can't see. Startup, frame pacing, rendering, package size and WebAssembly are measured separately (cold launches, frame timings, restore/publish sizes, headless Chrome), with their own method described where they appear.
Isolating changes. 7.0 kept moving while I wrote. Where a section explains one change, its table uses the nightly where that change could be isolated (and says which); the "where it landed" tables are the release code. Those earlier campaigns ran weeks apart, on an older .NET 10 patch and a busier machine, so the 6.7 baseline moves between them too (new Border() measured 1.94 μs then and 1.36 μs now): compare ratios within a table, never absolute times across tables. With the harness (linked below), dotnet run -c Release --filter "*Construction*" inside either app runs the same thing for one side.
If you're on the newest 6.7
6.7 kept getting servicing releases while 7.0 was in the oven, and 6.7.359 / 6.7.424 backport a handful of these wins: the scroll damage fix, the two Grid allocation fixes, UI Automation bounds,
ShapeVisualwalks.
Machine: Intel Core i9-14900KF (24 cores, 32 threads), 64 GB, Windows 11, NVIDIA RTX 4090, display at 150% scale and 119 Hz. The harness is at github.com/MartinZikmund/uno-perf-bench, with every script used for this post.
Final note: these are microbenchmarks, often measuring things that take a few dozen nanoseconds, which matter because a UI framework does them thousands of times per frame. Different hardware, a different OS, whatever else your machine is doing and maybe even what you had for breakfast will all move your numbers. An 18x on new Border() does not make your app 18x faster; it makes the part of your app that creates Borders 18x faster.
The property system
A UI framework is, at its heart, a machine for creating a ridiculous number of tiny objects and then setting properties on them. A modest XAML page is thousands of instances deriving from DependencyObject. A ListView scroll recycles hundreds of them per second. Each one carries a property store, inherited values, a DataContext, maybe a brush or two (which are themselves DependencyObjects with their own stores), and every one of those property writes goes through the same few hundred lines of code. With breaking changes finally allowed, that was our first target.
Objects that don't need finalizing
Consider the most boring benchmark imaginable:
Here's what it reported on the first 7.0 nightly I measured:
| Method | Version | Mean | Ratio | Allocated | Alloc Ratio |
|---|---|---|---|---|---|
| NewBorder | 6.7 | 1.94 μs | 1.00 | 2.27 KB | 1.00 |
| NewBorder | 7.0 | 376.5 ns | 0.19a | 2.45 KB | 1.08c |
| NewSolidColorBrush | 6.7 | 847.0 ns | 1.00 | 768 B | 1.00 |
| NewSolidColorBrush | 7.0 | 62.96 ns | 0.07b | 600 B | 0.78 |
A Border got 5x cheaper to createa and a brush 13xb, while allocations barely moved; for the Border they even went up 8%c. Fewer bytes didn't buy this. So where did 1.5 μs per Border go?
In 6.7, every DependencyObject owned a DependencyObjectStore, and the store had a finalizer. To refer back to its owner without keeping it alive, the store also rented a weak reference, a ManagedGCHandle wrapping a real GC handle, and that wrapper had a finalizer too:
So every element and every brush came with two finalizable objects and a GC handle. A finalizer isn't free even if it never does anything interesting. The runtime has to register a finalizable object when it's allocated, which takes the allocation off the fast path (the bump-a-pointer one that makes allocating in .NET so cheap). When the object dies, the GC moves it to the finalization queue, keeps it (and everything it references) alive, and promotes it. A dedicated thread runs the finalizer, and only a later GC frees the memory. You can see it in BenchmarkDotNet's GC columns: in 6.7, NewBorder reported Gen1 collections almost equal to Gen0 (0.121 vs 0.123 per 1,000 ops), meaning practically every object survived a GC. In 7.0, Gen1 is zero. Here are the columns the other tables hide, on the release code:
| Method | Version | Mean | Gen0 | Gen1 | Allocated |
|---|---|---|---|---|---|
| NewBorder | 6.7 | 1.36 μs | 0.1230 | 0.1211 | 2.27 KB |
| NewBorder | 7.0 | 74.04 ns | 0.0820 | - | 1.51 KB |
Gen0 drops by a third because each Border is a third smaller; Gen1 drops to nothing because nothing waits for a finalizer anymore.
unoplatform/uno#23703 removes those finalizers. With them gone, the self weak reference became lazy: it's created only when something needs a weak handle to the object (a parent link, an inheriting child, a callback), and published with an Interlocked.CompareExchange:
A leaf element that only ever has local values set never creates a GC handle at all, and brushes, which are never anyone's visual parent, lose the whole mechanism. Two earlier PRs made that possible. unoplatform/uno#23537 turned DependencyObject from an interface into a class: in 6.7 it had to be an interface because native Android and iOS views inherit from platform base classes, so a source generator stamped a hidden __Store field and ~15 forwarding members into every DO type. With 7.0 rendering everything through Skia, that constraint is gone. unoplatform/uno#23702 then folded the store into DependencyObject itself, one object per DO instead of two, and ActualInstance, which every SetValue reads first, went from a weak-handle dereference plus a cast to:
"No finalizers" isn't quite true, though: setting a parent link still mints the parent's self handle. Creating is only half the cost of a finalizable object anyway; the other half is paid when it dies. This benchmark creates 20,000 objects, drops them, and forces a full collection with pending finalizers, which is what your app pays a little at a time:
| Method | Version | Mean | Ratio | Allocated | Alloc Ratio |
|---|---|---|---|---|---|
| CreateAndRetireLeaves | 6.7 | 1.52 μs | 1.00 | 2.27 KB | 1.00 |
| CreateAndRetireLeaves | 7.0 | 199.2 ns | 0.13a | 1.51 KB | 0.66 |
| CreateAndRetireParents | 6.7 | 20.76 μs | 1.00 | 7.47 KB | 1.00 |
| CreateAndRetireParents | 7.0 | 3.22 μs | 0.16b | 6.15 KB | 0.82 |
On the release code a leaf is 7.6xa cheaper to create and retire, and a parent 6.4xb. On that nightly the parent was only 1.4x: the handle the parent still mints showed up right there in the numbers. What closed the gap is the next section, most likely, though I haven't isolated it.
Making the rest lazy
With the finalizers gone, the next cost was everything a UIElement allocates in its constructor in case it's needed later. Three PRs that landed late make that state lazy, and an allocation trace of the two nightlies around them splits the ~450 B they saved cleanly:
| PR | What became lazy | Bytes saved per Border |
|---|---|---|
| unoplatform/uno#24544 | UIElement's routed-event handler store, pressed-pointer set and a SerialDisposable |
~212 B |
| unoplatform/uno#24969 from @daaviid9 | the two per-object property dictionaries (inherited forwards, change tokens) | ~154 B |
| unoplatform/uno#25344 | the property storage collection itself | ~88 B |
And a fourth, from a direction I didn't expect. unoplatform/uno#25026 is about hit testing (more below), but every UIElement constructor used to call CoerceValue(HitTestVisibilityProperty), which materialized property details, a pooled array and a ModifiedValue (the coercion bookkeeping) for a value nobody had set. With hit-test visibility as a plain field, all of that is gone: 512 B less per element and new Border() 2.8x faster in one PR. Lazy is the cheapest kind of fast.
DataContext where it belongs
In WinUI, DataContext is declared on FrameworkElement. In Uno Platform 6.7 it was effectively declared on every DependencyObject, so propagating a new DataContext down the tree also ran the full SetValue(DataContext, Inheritance) pipeline on every brush and every transform. unoplatform/uno#23547 declares it on FrameworkElement only; non-FE objects such as brushes resolve the inherited DataContext directly into their bindings. It has a quieter allocation effect too: in 6.7, the first property get or set on any non-FE object force-created the DataContext property details, often growing the property array.
The benchmark flips DataContext on a panel of 100 Borders, each with a brush and a transform:
| Method | Version | Mean | Ratio |
|---|---|---|---|
| DataContextWithBrushes100 | 6.7 | 39.36 μs | 1.00 |
| DataContextWithBrushes100 | 7.0 | 14.73 μs | 0.37a |
It doesn't allocate, so I've dropped the columns. With brushes and transforms in the tree, propagation is 2.7x fastera, because 200 of the 300 objects it used to visit are no longer visited at all. The brushes themselves also got cheaper to touch: creating a SolidColorBrush and reading a property went from 1.08 μs to 52 ns (0.05), and a TranslateTransform with X set from 1.33 μs to 157 ns (0.12).
Walking the tree without boxing
Entering and leaving the live tree walks every element: raising Loaded/Unloaded, propagating inherited properties, resolving theme resources. Three changes took the garbage out of that walk:
- unoplatform/uno#23744 removes Uno Platform's non-WinUI
IEnumerableimplementation fromFrameworkElement(more in the layout section, where it matters most). - unoplatform/uno#24519 indexes into the framework's own collections (
VisualStateGroups,Setters,Storyboard.Children,Inlines) instead of going throughIEnumerable, which boxed aList<T>.Enumerator(40 B) per collection per visit. - unoplatform/uno#24525 stops re-boxing
HitTestVisibility, an inherited enum property whose coercion returned a fresh box for every element in the subtree.
Then the late surprise. On the October nightly, 62% of the bytes of attaching a subtree were one compiler-generated iterator, GetResourceDictionaries, allocated on every implicit-style lookup as an element enters the tree. unoplatform/uno#24523 walks the resource dictionaries with a plain loop instead:
| Method | Version | Mean | Ratio | Allocated | Alloc Ratio |
|---|---|---|---|---|---|
| AttachDetachSubtree | 6.7 | 343.5 μs | 1.00 | 41.17 KB | 1.00 |
| AttachDetachSubtree | 7.0 | 125.9 μs | 0.37a | 4.88 KB | 0.12 |
| AttachDetach100TemplatedControls | 6.7 | 2.53 ms | 1.00 | 332.36 KB | 1.00 |
| AttachDetach100TemplatedControls | 7.0 | 1.05 ms | 0.41b | 24.28 KB | 0.07c |
The bordered subtree enters and leaves the tree 2.7x faster with 88% less garbagea. The second pair uses real templated controls (50 Buttons and 50 CheckBoxes, templates already applied): 2.4x fasterb, and a templated control entering the tree now allocates 93% lessc than in 6.7.
Hit-test visibility without the property system
In 6.7, "can this element receive pointer input" was an inherited, coerced dependency property: collapsing a panel re-coerced the value on every descendant through the full property pipeline, boxing as it went. unoplatform/uno#25026 pushes the computed value down the tree directly instead, and stops at any subtree that's already up to date:
| Method | Version | Mean | Ratio | Allocated | Alloc Ratio |
|---|---|---|---|---|---|
| CollapseAndShow | 6.7 | 215.6 μs | 1.00 | 26.94 KB | 1.00 |
| CollapseAndShow | 7.0 | 67.23 μs | 0.31a | 1.12 KB | 0.04 |
3.2x faster with 96% fewer bytesa, and it happened in two steps. The bytes went first: almost all of 6.7's 26.9 KB was boxed HitTestability values, and #24525 returns shared boxes. The time went with #25026: on the nightly just before it, the toggle still took 198.5 μs. Even setting IsHitTestVisible on a single element is now ~2x faster, because the property no longer feeds an inherited, coerced value through the pipeline.
Boxing, one property at a time
unoplatform/uno#12677 from @Youssef1313 attacks the most basic allocation in a XAML framework: SetValue takes an object, so every bool, int or double you assign gets boxed into a fresh 24-byte heap object. The PR (opened in 2023, finally landing in 7.0, which is a story in itself) introduces cached boxes, teaches the DependencyProperty source generators and our WinAppSDK API sync generator to emit them, and adds an analyzer to keep new code honest:
There's also a fun latent bug this fixed. 6.7 had cached boxes for some enum values, but declared them with the enum type:
so the caches never cached anything. The declarations are fixed now. Each row below is one property set, alternating between two values; the "uncached" rows are controls that must still allocate:
| Property set | 6.7 | 7.0 |
|---|---|---|
Opacity = 1.0 / 0.0 (cached) |
24 B | -a |
Opacity = 0.25 / 0.75 (uncached, control) |
24 B | 24 B |
IsHitTestVisible |
72 B | - |
IsTabStop |
24 B | - |
Canvas.SetLeft(el, 0.0 / 1.0) (cached) |
24 B | -a |
Canvas.SetZIndex |
24 B | - |
Allocating a 24-byte box is fast, so for double this is a GC-pressure win, not a CPU win (the Opacity and Canvas.Left sets are within 10% of 6.7a). The bool setters are a different story: IsEnabled, IsHitTestVisible and Visibility sets are ~1.7-2.1x faster too, because the generated setters and the hit-test pipeline changed along with the boxes.
Where the property system landed
| Method (release code) | 6.7 | 7.0 | Ratio | Allocated 6.7 → 7.0 |
|---|---|---|---|---|
new Border() |
1.36 μs | 74.0 ns | 0.05a | 2.27 KB → 1.51 KB |
new Grid() |
1.38 μs | 90.0 ns | 0.07 | 2.48 KB → 1.71 KB |
new SolidColorBrush() |
755.5 ns | 20.3 ns | 0.03b | 768 B → 368 B |
new Button() |
2.09 μs | 530.7 ns | 0.25 | 4.81 KB → 4.11 KB |
new TextBlock() |
2.05 μs | 514.3 ns | 0.25 | 4.38 KB → 3.75 KB |
| Create and retire a leaf | 1.52 μs | 199.2 ns | 0.13 | 2.27 KB → 1.51 KB |
| Create and retire a parent | 20.76 μs | 3.22 μs | 0.16 | 7.47 KB → 6.15 KB |
| Element churn (create, attach, detach) | 24.54 μs | 3.81 μs | 0.16 | 9.44 KB → 8.19 KB |
IsHitTestVisible set |
142.7 ns | 66.7 ns | 0.47 | 72 B → 0 |
Visibility set |
178.1 ns | 103.5 ns | 0.58 | 48 B → 24 B |
| DataContext over 100 bordered leaves | 39.36 μs | 14.73 μs | 0.37 | - |
| Attach + detach a 120-element subtree | 343.5 μs | 125.9 μs | 0.37 | 41.17 KB → 4.88 KB |
| Attach + detach 100 templated controls | 2.53 ms | 1.05 ms | 0.41 | 332 KB → 24 KB |
Stack it all up and creating a Border is 18x fastera than in 6.7 while allocating a third less, and a brush is 37x fasterb.
Layout and the visual tree
What happens after an element is created: putting it into the tree, laying it out, walking over it. These are the paths that run on every navigation, every resize and every ListView scroll, where tiny per-element costs multiply by "every element on screen".
Elements aren't collections
A pop quiz: in Uno Platform 6.7, is a Border an IEnumerable?
Yes it was, and so was every FrameworkElement. Uno Platform added that years ago so you could write new StackPanel { child1, child2 } in C#. It's a cute trick, and it isn't in WinUI. unoplatform/uno#23744 removes it as one of 7.0's breaking changes for WinUI parity. The perf effect is what makes it interesting. When an element enters or leaves the live tree, Uno Platform walks its dependency property values to connect them, and in 6.7 that walk had a branch for collection-valued properties:
Border.Child is a property whose value is an element, and every element was an IEnumerable. So for a Border with a child, the walk entered the child once as a property value and a second time "as a collection", through a boxed enumerator over a fresh copy of the child list, entering each grandchild again. The deeper the nesting, the more double work piles up. To see it, the benchmark adds the same number of elements to the live tree in two shapes, as 20 chains of nested Borders or as a flat panel of TextBlocks, and removes them again:
| Method | Depth | Version | Mean | Ratio | Allocated | Alloc Ratio |
|---|---|---|---|---|---|---|
| NestedBorders | 2 | 6.7 | 59.75 μs | 1.00 | 11.70 KB | 1.00 |
| NestedBorders | 2 | 7.0 | 39.19 μs | 0.66 | 4.95 KB | 0.42 |
| NestedBorders | 4 | 6.7 | 105.4 μs | 1.00 | 21.39 KB | 1.00 |
| NestedBorders | 4 | 7.0 | 57.32 μs | 0.54 | 4.95 KB | 0.23 |
| NestedBorders | 8 | 6.7 | 391.9 μs | 1.00 | 87.66 KB | 1.00 |
| NestedBorders | 8 | 7.0 | 119.0 μs | 0.30a | 4.96 KB | 0.06 |
| FlatTextBlocks | 8 | 6.7 | 277.8 μs | 1.00 | 60.13 KB | 1.00 |
| FlatTextBlocks | 8 | 7.0 | 158.4 μs | 0.57b | 33.69 KB | 0.56 |
Look at the 6.7 nested rows: going from depth 4 to depth 8 doubles the element count but quadruples the allocation, the signature of work that's done again for every level below. In 7.0 the bytes don't grow with depth at all (that's #23744 plus the resource-dictionary loop from #24523 in the previous section), and a chain of 8 nested Borders enters and leaves the tree 3.3x faster with 94% less garbagea. The flat panel, which never had the double walk, still gets 1.8x fasterb from the property-system work.
The Grid that forgot to give back
unoplatform/uno#24229 is a one-line move with an outsized effect. Grid measures its children in up to seven "cell groups", each with a small scratch structure whose 16-entry array is rented from a shared pool and returned on Dispose():
When a group was empty (the common case), the method returned before disposing, so the array never went back. The pool's bucket drained, and from then on every rental was a brand-new allocation. A leak that doesn't leak memory, just throughput. With unoplatform/uno#24233 indexing the row/column definitions instead of enumerating them:
| Method | Version | Mean | Ratio | Allocated | Alloc Ratio |
|---|---|---|---|---|---|
| ResizePass_NoDefinitions | 6.7 | 3.56 ms | 1.00 | 40.05 KB | 1.000 |
| ResizePass_NoDefinitions | 7.0 | 2.70 ms | 0.76 | 52 Ba | 0.001 |
| ResizePass_WithDefinitions | 6.7 | 636.0 μs | 1.00 | 94.05 KB | 1.00 |
| ResizePass_WithDefinitions | 7.0 | 517.4 μs | 0.81 | 14.43 KB | 0.15b |
A layout pass over 341 Grids without row and column definitions now allocates 52 bytesa, down from 40 KB, and it's 1.3x faster. With definitions it's 85% less garbageb and 1.2x faster.
Already in 6.7.359+
Both Grid fixes were backported and shipped in 6.7.359 (2026-11-05), so if you're on the newest 6.7 this one is already yours.
Walking the tree, from O(n²) to O(n)
VisualTreeHelper.GetChild and GetChildrenCount are the most-called tree accessors in any XAML app: Uno Platform calls them on every measure, and so do toolkit helpers like FindDescendant and most UI test frameworks. In 6.7 they were LINQ one-liners:
unoplatform/uno#24232 rewrites them as indexed loops, removing 136 B of garbage per call. That fixed the garbage, but not the shape: child i was still found by scanning from 0, because the collection may hold ElementStub placeholders (x:Load deferred elements) to skip. So the classic for (i < GetChildrenCount(p)) GetChild(p, i) walk was O(n²) on a wide panel. On our 2,000-child StackPanel, that was about 2.5 μs per child visited, more than fifty times the per-element cost of a deep tree. unoplatform/uno#25048 adds a direct-index fast path for the common case where there are no stubs:
| Method | Version | Mean | Ratio | Allocated |
|---|---|---|---|---|
| WalkDeepTree (per element) | 6.7 | 44.87 ns | 1.00 | 136 B |
| WalkDeepTree (per element) | 7.0 | 17.77 ns | 0.40a | - |
| WalkWidePanel (per child) | 6.7 | 2.51 μs | 1.000 | 136 B |
| WalkWidePanel (per child) | 7.0 | 4.91 ns | 0.002b | - |
The deep tree (a fan of 10, five levels) gets 2.5x fastera and stops allocating, which is #24232. The wide panel gets 510x fasterb, which is #25048, and the shape you'd expect from an O(n²)-to-O(n) fix: the deep tree, where every panel has 10 children, didn't need it, and the 2,000-child panel is where it's the whole story. A full walk of the 2,000-child panel goes from 5 ms to 10 μs. Think a StackPanel of 2,000 log lines that a test framework walks once per assertion.
Two regressions that turned into wins
When I first measured this suite, two rows allocated more than 6.7. Both got fixed while I was writing:
| Method | 6.7 | 7.0 nightly | 7.0 release |
|---|---|---|---|
| ItemsRepeater scroll step | 780.9 μs, 278.8 KB | 393.5 μs, 425.4 KB | 272.4 μs, 111.8 KBa |
UserControl create + attach + detach |
26.98 μs, 10.64 KB | 17.55 μs, 12.04 KB | 7.03 μs, 9.56 KBb |
- ItemsRepeater. 7.0 re-synced
ItemsRepeaterwith the WinUI sources (unoplatform/uno#23406), which made every realized item a scroll-anchoring candidate, as in WinUI. Anchoring then asked each candidate for its bounds via the publicTransformToVisual, which allocates aMatrixTransform, a fullDependencyObject, just to read a matrix. unoplatform/uno#25049 uses the internal allocation-free helper instead. A scroll step is now 2.9x faster than 6.7 and allocates 60% lessa. UserControlnow derives fromControl, as in WinUI, which first cost ~1.4 KB more per instance. With the lazy property storage from the property-system section it's back below 6.7, and 3.8x fasterb.
Text
Text is the most expensive thing most apps do without noticing. Before a TextBlock can be laid out, Uno Platform has to answer a deceptively simple question: how wide is this string? To answer it, Uno Platform has to:
- split the string into runs of the same script (Latin, Arabic, Han...), because each may need a different font,
- find where lines are allowed to break, following the Unicode line-breaking rules (via ICU, the International Components for Unicode library),
- resolve bidirectional order, so Hebrew inside English comes out right (Unicode BiDi, also ICU),
- make sure the font has every glyph, and fall back to another font for those it doesn't,
- shape each run with HarfBuzz, which turns characters into positioned glyphs.
That's a lot of machinery for "Save", "Cancel" and "Item 42", which is what most of an app's text looks like.
Don't ask questions you already know the answer to
The drawing-backend PR, unoplatform/uno#24153, is mostly about abstracting rendering away from SkiaSharp. Hidden inside it is a series of commits that teach UnicodeText that the common case is common. In 6.7, every inline went through the full pipeline on every layout:
One P/Invoke into ICU per character for the script, one native call into Skia per character for glyph coverage, two ICU break iterators per string (each ~4 μs just to open) and a BiDi pass, for a label that is ASCII, left-to-right and never wraps. In 7.0:
Glyph coverage for ASCII is answered from two 64-bit bitmaps filled once per font, and HarfBuzz shaping reuses a thread-static buffer and memoizes identical shapes. To keep the memo honest, the benchmark measures 200 different strings in a loop:
On the nightly where the fast paths landed and nothing else had yet:
| Method | Version | Mean | Ratio | Allocated | Alloc Ratio |
|---|---|---|---|---|---|
| ShortAsciiNoWrap | 6.7 | 16.19 μs | 1.00 | 12.90 KB | 1.00 |
| ShortAsciiNoWrap | 7.0 | 3.64 μs | 0.22a | 10.90 KB | 0.84 |
| ShortAsciiWrap | 6.7 | 16.30 μs | 1.00 | 12.90 KB | 1.00 |
| ShortAsciiWrap | 7.0 | 8.33 μs | 0.51b | 11.02 KB | 0.85 |
| MixedScript | 6.7 | 36.54 μs | 1.00 | 14.25 KB | 1.00 |
| MixedScript | 7.0 | 11.92 μs | 0.33c | 13.74 KB | 0.96 |
| RightToLeft | 6.7 | 17.73 μs | 1.00 | 9.27 KB | 1.00 |
| RightToLeft | 7.0 | 10.73 μs | 0.60d | 9.25 KB | 1.00 |
The short ASCII label that never wraps is 4.4x fastera here: that's the full fast path, no break iterator, no BiDi, no per-character P/Invokes. Turn wrapping on and the same string is "only" 2x fasterb, because it still opens an ICU line breaker. The surprise is MixedScript at 3xc even though it takes the slow path: the per-character script and coverage calls were a bigger share of the old cost than the break iterators. Right-to-left gains least (1.65x)d, which makes sense: the BiDi pass is real work there and nobody skipped it.
Fast paths need guard rails. This one briefly broke TextTrimming="WordEllipsis", because the trimmer needs the word boundaries the fast path skipped, which is why the condition mentions it.
Opening a break iterator once, not per string
Opening an ICU break iterator costs a flat ~4 μs regardless of the text (measured in the PR): it resolves the locale's rules and clones a state machine. ICU can re-point an existing iterator at new text (ubrk_setText) for almost nothing. unoplatform/uno#25050 keeps one iterator per thread and boundary type, keyed on culture. That lands exactly on the text the fast paths don't cover, and you can see it in the same benchmarks on the release code:
| Method | Version | Mean | Ratio | Allocated | Alloc Ratio |
|---|---|---|---|---|---|
| ShortAsciiWrap | 6.7 | 17.89 μs | 1.00 | 12.90 KB | 1.00 |
| ShortAsciiWrap | 7.0 | 5.23 μs | 0.29a | 7.82 KB | 0.61 |
| MixedScript | 6.7 | 39.34 μs | 1.00 | 14.25 KB | 1.00 |
| MixedScript | 7.0 | 9.52 μs | 0.24b | 9.91 KB | 0.70 |
The wrapped label went from 2x to 3.4xa faster than 6.7 and mixed script from 3x to 4.1xb, while the no-wrap label, which never opened an iterator, didn't gain; it actually gave a little back between the two builds (4.4x → 3.7x, unattributed). Lots of PRs landed between the two builds, so that's the shape of the evidence rather than an isolated measurement, but it's a very specific shape. (On WebAssembly the ICU build doesn't export ubrk_setText yet, so the browser still opens one per string.)
Arranging text shouldn't re-shape it
In 6.7, every TextBlock.ArrangeOverride invalidated the element's recording, and a different arrange size could re-parse the text even when the line already fit. unoplatform/uno#24972 only invalidates when the parsed text actually changes, and reuses the layout when it's still valid for the new size. The benchmark is the list-row case: a vertically centered one-line label, measured and arranged at sizes a pixel apart, so nothing about the text changes but the box around it does:
| Method | Version | Mean | Ratio | Allocated | Alloc Ratio |
|---|---|---|---|---|---|
| CenteredLine | 6.7 | 35.71 μs | 1.00 | 25.21 KB | 1.00 |
| CenteredLine | 7.0 | 5.01 μs | 0.14a | 7.69 KB | 0.31 |
7x faster with 69% less garbage.a The fast paths above account for roughly 4x of that; #24972 stacks another 1.8x on top and halves what was left of the allocations (measured on the nightlies on either side of it). A side effect worth a line of its own: a Text change used to invalidate rendering three times even for a collapsed TextBlock; now a block that's collapsed or out of the tree doesn't touch the compositor at all. That's the hidden-tab, collapsed-expander case.
Where text landed
The whole text suite on the release code, for reference:
| Method | 6.7 | 7.0 | Ratio | Allocated 6.7 → 7.0 |
|---|---|---|---|---|
| Short ASCII label, no wrap | 18.23 μs | 4.88 μs | 0.27 | 12.90 → 7.77 KB |
| Short ASCII label, wrap | 17.89 μs | 5.23 μs | 0.29 | 12.90 → 7.82 KB |
| Wrapped paragraph | 57.29 μs | 16.88 μs | 0.29 | 59.61 → 29.36 KB |
| Mixed script | 39.34 μs | 9.52 μs | 0.24 | 14.25 → 9.91 KB |
| Right-to-left | 20.30 μs | 7.97 μs | 0.39 | 9.27 → 7.24 KB |
| Same text, new width | 15.09 μs | 3.03 μs | 0.20a | 6.88 → 4.30 KB |
Create a TextBlock and measure it |
33.74 μs | 6.13 μs | 0.18b | 16.01 → 12.06 KB |
| Arrange a centered line | 35.71 μs | 5.01 μs | 0.14 | 25.21 → 7.69 KB |
Re-measuring the same text at a new width (think a column being resized) is 5x fastera, and that's most likely the shape memo answering. Creating a brand-new TextBlock and measuring it, the thing every list item does when it's realized, is 5.5x fasterb.
Drawing text: a regression we caught before you did
First the part that nearly went wrong. For about a week and a half during development, 7.0 drew text much slower than 6.7: when #24153 moved drawing behind the new backend abstraction, text started being filled as glyph outline paths, which skips Skia's glyph cache and hinting: 10-40x slower and blurry at small sizes. unoplatform/uno#24654 put text back on Skia's text-blob path.
And then the part that went right. I expected drawing text to come out about even with 6.7, so I measured it: a window with 600 TextBlocks on the 119 Hz display, Vulkan on 6.7 and 7.0, median of 6 rounds of 5 s. Static just redraws them, move shifts the whole panel a pixel every frame, and recolor changes every label's Foreground every frame:
| Scene | 6.5 | 6.7 | 7.0 |
|---|---|---|---|
| Static | 60 fps, 1.0 ms | 119 fps, 0.4 ms | 118 fps, 0.15 ms |
| Move | 60 fps, 1.8 ms | 1.8 fps, 551 msa | 119 fps, 1.0 ms |
| Recolor | 38 fps, 23 ms | 3.8 fps, 270 msb | 115 fps, 6.5 ms |
The milliseconds are process CPU per frame. 6.5 tops out at 60 fps in this harness on every scene. Not even close to neutral, then: on 6.7, a screen full of labels that moves or changes color drops to 2-4 frames per seconda,b, with the UI thread busy 250-525 ms per frame. 7.0 holds the full refresh rate. A sampling trace says the text isn't the problem: nearly all of 6.7's busy time in both scenes is in DamageRegionExtensions.UnionRect, unioning each label's rectangle into an SKPath with a path boolean, 600 times a frame. That's the damage tracking from "When damage tracking costs more than drawing" below, and 7.0's trace doesn't have it at all.
Rendering and scrolling
If you scrolled a big list in Uno Platform 6.7 on desktop and thought "this used to be smoother", you were right, and I owe you an explanation.
How a frame gets drawn, in two minutes. Uno Platform's Skia renderer keeps a tree of composition visuals mirroring your elements. Each frame, the UI thread walks that tree and records drawing commands; the render thread draws them to the window's surface (OpenGL, Vulkan or Metal) and presents. To avoid redrawing the whole window when only a caret blinks, Uno Platform tracks damage, the region that changed since the last frame, and only that region is redrawn. Damage tracking is a bet: it costs something to compute, and pays off if it lets you skip enough drawing.

LogView, one of the "real world" scenes used throughout this section: a long, scrolling log at 119 Hz (Skia on Vulkan, 7.0).When damage tracking costs more than drawing
6.7 accumulated damage as an SKPath, unioning every contribution with a path boolean:
When a scroll viewer moves its content, every visual inside has moved, so every one contributes damage: a stroke-to-fill outset, two path booleans, a native path allocation, and a union against a path that grows with each contribution. At 200 realized visuals, that's hundreds of path booleans per frame, to compute an answer we already knew (the whole viewport). unoplatform/uno#23986 lets a visual that merely moved contribute its bounds and collects damage as rectangles with no booleans; Ramez (@ramezgerges) then rebuilt DamageRegion entirely on rectangles in #24153 (capped at 16, clip bounds threaded down the walk, off-screen leaves skipped). In the PR's microbenchmark, one moved BorderVisual went from 26,642 ns to 18 ns, about 1,500x, which is what happens when you stop doing path booleans to compute an answer you already knew.
A microbenchmark of the damage decision is nice, but what you feel is the whole app. The scenario: scroll an ItemsRepeater of ~2,800 Fluent Buttons by 60 steps on Win32 and measure process CPU, including the finalizer and GC threads. @mikernet measured the regression in the open on unoplatform/uno#23984:
| Version | Process CPU, 60 scroll steps (median) |
|---|---|
| 6.5.237 | 805 ms |
| 6.7.103 | 3,602 ms |
| build with the fix | 1,656 ms |
and the same scenario in my own harness, the unoplatform/uno#24791 repro (2,837 Buttons in an ItemsRepeater, 60 ChangeView steps of 40 px), on the machine above, all three versions in one session, median of 15 passes per row (a different machine from the issue, so compare within the table, not across):
| Version (backend) | Process CPU, 60 scroll steps | UI thread / frame | Render thread / frame |
|---|---|---|---|
| 6.5.237 (OpenGL, draws on the UI thread) | 406 ms | 2.6 ms | - |
| 6.7.135 (OpenGL, default) | 2,125 msa | 16.1 ms | 1.4 ms |
| 6.7.135 (Vulkan) | 1,891 ms | 16.9 ms | 1.2 ms |
| 7.0.65 (Vulkan, default) | 297 msb | 1.2 msc | 0.8 ms |
| 7.0.65 (OpenGL) | 422 ms | 1.1 ms | 0.7 ms |
6.7 cost about 5x what 6.5 dida, on either backend, and 7.0 is back at the 6.5 level, on its default backend even a little below itb (the passes are noisy, 6.5 ranged 250-734 ms and 7.0 141-688 ms, so I'll call it "at least as good"). The per-frame columns show where 6.7's cost was: the UI thread, at 16 ms a frame, which at 119 Hz is the whole frame budget and then some. 7.0 spends 1.2 ms therec. (6.5 drew on the UI thread, so its 2.6 ms includes drawing; 6.7 and 7.0 draw on a render thread.)

Buttons in an ItemsRepeater, each holding a FontIcon and its index (7.0, Skia on Vulkan).Already in 6.7.359+
A variant of #23986 was backported (unoplatform/uno#24582) and shipped in 6.7.359. The rectangle-based
DamageRegionand the next section are 7.0 only.
Damage is a permission, not a clip
Even with cheap damage computation, the draw side clipped the frame exactly to the damage path:
A GPU backend has to honour every edge of that path, typically with a coverage mask tested on every subsequent draw: more work than redrawing a slightly larger rectangle. unoplatform/uno#24821 changes the contract: the present receives a short list of merged, disjoint, device-pixel-snapped rectangles it's allowed to restrict itself to, and each backend picks the cheapest way (a scissor rectangle on GPUs):
| PR measurements, 2,837 buttons, Win32 OpenGL, median of 3 | record / frame | draw / frame |
|---|---|---|
| 6.5.237 | 2.12 msc | 10.05 ms |
| 7.0 before #24821 | 4.50 ms | 31.70 ms |
| 7.0 with #24821 | 3.40 msb | 6.45 msa |
Drawing a frame is 4.9x cheapera than in the 7.0 previews and 36% cheaper than in 6.5; recording got 24% cheaperb. Recording is still ~60% above 6.5c, though, and nobody has attributed why yet (it isn't damage). The other half of #24972 helps here too: a visual that only moved keeps its recorded drawing commands instead of re-recording them (author's numbers: -12% to -25% UI-thread time while scrolling). In my own scroll run above, the render thread spends 1.4 ms per frame on 6.7 and 0.8 ms on 7.0, each on its default backend.
The smaller stuff
- unoplatform/uno#24231:
ShapeVisualwalks its shapes by index instead of LINQ on every frame (-29% paint allocation in the PR). Also in 6.7.359+. - macOS gets a dedicated Metal render thread (unoplatform/uno#23594), and iOS runs at 120 Hz on ProMotion iPhones (unoplatform/uno#24704).
- Android defaults to Vulkan in 7.0 (6.7 used OpenGL, already paced to vsync), and unoplatform/uno#24707 paces Vulkan presents to the display too. That is meant to keep 7.0 from regressing battery life rather than to beat 6.7 (not measured here).
Vulkan, and the CPU you get back
7.0 makes Vulkan the default on Windows. It had a startup cost (next sections), but it buys something too. A window with one infinite opacity animation (think ProgressRing), process CPU over 30 seconds:
| One running animation, process CPU | 6.7 | 7.0 |
|---|---|---|
| OpenGLa | 13.7% (7.7-14.1) | 7.6% (5.3-18.9) |
| Vulkan | 5.4% (5.2-6.2) | 5.7% (5.3-5.9) |
| Default backend (OpenGL on 6.7, Vulkan on 7.0) | 17.4% (9.7-29.8) | 5.9% (5.2-7.8) |
| Static window, default backend | 0.05% (0-0.4) | 0.2% (0.1-0.3) |
Medians with ranges, 3-5 runs of 30 s each. On Vulkan, one animation costs about 5.5% of the process on both versions. On OpenGL it costs 6.7 roughly 2.5x thata, with wide swings from run to run, so 6.7 apps, which defaulted to OpenGL, paid about three times what a default 7.0 app pays for the same ProgressRing. In earlier runs on this machine, OpenGL kept a whole core busy for as long as anything animated; on today's NVIDIA driver (32.0.16.1714) it doesn't, so I treat that spin as driver- or setup-dependent. It stays an open issue on the GL fallback (unoplatform/uno#25300), not a 7.0 feature.
Scroll smoothness
The previous section was about how much a frame costs. This one is about something users notice even more: whether each frame shows something new. A list can render at 120 fps and still feel like it stutters if only every other frame moves.

ScrollingFeed, a card feed that scrolls continuously: 120 fps on 7.0, Skia on Vulkan, on 12% CPU.When you flick a list or spin the mouse wheel, the scroll keeps moving after you let go: inertia. In 6.7, inertia ran on a timer:
A thread-pool timer firing ~60 times a second, writing the scroll position from a background thread, while the display refreshes on its own schedule. On a 60 Hz screen the two clocks drift, so some frames get two updates and some none. On 120 Hz it's worse by construction: every other frame repeats the previous position.
unoplatform/uno#24735 gives Uno Platform a per-frame clock modeled on how WinUI orders a frame: FrameStarting with the frame's timestamp, then layout, then CompositionTarget.Rendering, then layout again, then recording. It estimates the display's frame interval from the median of recent gaps, ignoring idle ones. unoplatform/uno#24736 moves inertia onto that clock:
| Frames per second that show a new scroll position (PR #24736, Win32, 119 Hz) | 6.7 | 7.0 |
|---|---|---|
| Touch fling | 68 | 119a |
| Mouse wheel | 55 | 120b |
| Touchpadc | 0 | 120 |
Touch flings show a new position on 1.75x as many framesa, the mouse wheel on 2.2x as manyb, which on a 119 Hz display means every frame.
On a Galaxy Z Fold7 and an iPhone 13 Pro (both 120 Hz) the PR reports roughly 55-70 → 117-120. The touchpad rowc is a correctness fix more than a speedup: small deltas were divided down to zero, so it didn't scroll with inertia at all. And a clock that ticks when nothing moves is the classic way to lose battery, so I checked: a static window on the release code idles at 0.1-0.3% process CPU, about where 6.7 is (0-0.4%).
In my own harness, one mouse-wheel notch over a long list on the same 119 Hz display, median of 15: 6.7 shows a new scroll position 15 times a second (fewer than the PR's 55; different machine and backend) while the scroll animates (22 clock ticks a second, a third of them repeating the old position), and 7.0 122 times, every frame, with no repeats. The animation also finishes in 330 ms instead of 455.
If you used CompositionTarget.Rendering as a "something changed" signal, check it: it's no longer raised for a re-present of an unchanged frame.
Startup
When I first measured startup, 7.0 was worse than 6.7: about three times the allocation, and two gen0, two gen1 and two gen2 collections before the first frame, where 6.7 had none. On Windows the first window also appeared over a hundred milliseconds later. Here's why, and how 7.0 ended up starting faster than 6.7 on Windows.
Fonts: three copies of every file
Before the first frame, Uno Platform preloads the fonts in your app's font manifest. In 6.7, each file was streamed straight into Skia's native memory. In 7.0, a correct fix for variable fonts (flicker when switching weights) introduced a per-URI cache of the font bytes:
Then the Skia provider copied it into native memory again, once per font size. Every buffer above 85,000 bytes lands on the large object heap, which is only collected in gen2: that's how a blank app did gen2 collections before drawing anything. unoplatform/uno#25051 adds IFontProvider.LoadFontFile(Stream); the Skia provider reads the file once, at its exact size, into native memory, and every size shares that buffer. Loading the 37 Open Sans faces went from 18.1 MB to 0.19 MB of managed allocation (PR's numbers). Credit too to @AtakanUk, who independently went after the same problem in unoplatform/uno#24973.
| Blank app, to the first frame (median of 19 launches) | Allocated | GCs (gen0 / gen1 / gen2) |
|---|---|---|
| 6.7 | 7.7 MB | 0 / 0 / 0 |
| 7.0 before #25051 | 21.9 MB | 2 / 2 / 2 |
| 7.0 release | 5.5 MBa | 0 / 0 / 0b |
The font fix took startup allocation down by 75%, to 29% below 6.7a, and back to zero collectionsb before the first frame, which is where 6.7 always was.
(The October nightly was at 3.4 MB. The +2.2 MB since is two array pools building their bucket tables, the same tables 6.7 builds: the October build silently ran without memory-aware pooling because the pools looked up Windows.System.MemoryManager by an assembly name that no longer existed. unoplatform/uno#25823 fixed that. Right trade, though a bucket that's never been used doesn't need its slot array yet: unoplatform/uno#26554.)
Vulkan, and the startup cost nobody asked for
Creating a Vulkan instance and device is expensive. 6.7 didn't pay it (OpenGL was the default), and 7.0 paid it synchronously while constructing the first window. But nearly all of that work doesn't need a window: only the surface and swapchain do. unoplatform/uno#25052 starts instance and device creation on a background thread as soon as the host is built, in parallel with the rest of startup. Picking the GPU without a surface uses vkGetPhysicalDeviceWin32PresentationSupportKHR, then double-checks against the real surface, because a swapchain the device can't present to is not a failure mode you want to discover at runtime.
| Blank app, process start → first frame (median of 19, range) | OpenGL | Vulkan | Default |
|---|---|---|---|
| 6.7 | 934 ms (926-953) | 1,147 ms (1,121-1,172) | 934 ms (OpenGL) |
| 7.0 before #25052 | parity with 6.7c | parity with 6.7 | +138 ms (Vulkan) |
| 7.0 release | 883 ms (873-912) | 887 ms (876-924)a | 895 ms (Vulkan)b |
| Working set at first frame, 6.7 / 7.0 | 178 / 173 MB | 233 / 238 MB |
Before #25052 this table said something I didn't expect: on the same backend, 7.0 started exactly as fast as 6.7c, and the whole gap was the backend switch. Vulkan cost 130-210 ms and 55-65 MB on both versions; that's the driver, not us, which is why moving it off the critical path was the right fix. With #25052, 7.0's Vulkan column is 260 ms (23%) below 6.7'sa, where before it the two were level, Vulkan costs 7.0 no more than OpenGL to the first frame, and a default 7.0 app shows its first frame 39 ms (4%) sooner than 6.7b. (The null copy of 7.0 lands at 886-889 ms on every backend, so differences of a few ms between the 7.0 columns are noise.) The working set doesn't change: the background thread hides the cost, it doesn't shrink it.
Smaller things
- unoplatform/uno#24539 bakes the acrylic luminosity values into the theme XAML, so the inactive theme's dictionary is never built: ~0.9 MB less allocated before the first idle.
- The Fluent theme loaded an entry shell, an empty v1 assembly and the real v2 one; unoplatform/uno#24083 merges them, two fewer assembly loads.
- macOS builds the accessibility tree only when a client first asks (unoplatform/uno#25028; author reports -13% to -46% on an M2).
Each of these startup regressions came from a change that was right on its own terms: a cache that fixed a flicker, a better default renderer. None showed up in a microbenchmark. They showed up when we counted allocations and GCs up to the first frame of a blank app and timed cold launches, so that's now part of how we measure releases.
WebAssembly
Everything above was measured on desktop. The same code runs in the browser, so: do the wins survive the trip to WebAssembly, where C# runs on Mono's interpreter and every native call crosses a JavaScript boundary?
There's a trap first. 6.7's default WebAssembly renderer was the native DOM one: every TextBlock a <p>, every Border a <div>, and the browser measured the text. 7.0 is Skia-only, so a blank 6.7 app and a blank 7.0 app aren't running the same kind of renderer. This section compares Skia with Skia (6.7 with <UnoFeatures>SkiaRenderer</UnoFeatures>), with the DOM column for orientation. Release publish, interpreter (no AOT), headless Chrome with SwiftShader, 5 interleaved launches per side; times are CPU-side work only.
| Scenario, per op (release code) | 6.7 DOM | 6.7 Skia | 7.0 | vs 6.7 Skia |
|---|---|---|---|---|
new Border() |
13.8 μs | 5.35 μs | 0.60 μs | 8.9x |
new Button() |
52.8 μs | 17.6 μs | 7.6 μs | 2.3x |
new SolidColorBrush() |
500 ns | 500 ns | 100 ns | 5x |
Tag set + get |
740 ns | 715 ns | 585 ns | 1.22x |
IsHitTestVisible toggle |
2.77 μs | 2.72 μs | 0.94 μs | 2.9x |
| DataContext over 100 bordered leaves | 944 μs | 960 μs | 494 μs | 1.94x |
| Attach + detach 100 bordered leaves | 2.82 ms | 7.44 ms | 5.08 ms | 1.47x |
| Grid resize pass (341 Grids) | 7.92 ms | 37.5 ms | 21.1 ms | 1.77x |
| Short ASCII label, measure | 18.5 μs | 174 μs | 78 μs | 2.2xa |
| Wrapped paragraph, measure | 19.0 μs | 399 μs | 194 μs | 2.06xa |
10 Buttons, templates + layout |
3.01 ms | 3.29 ms | 2.03 ms | 1.62x |
The shape is the desktop shape. Allocations moved too: a Border 1,840 → 1,184 B, a Grid pass 24.6 KB → zero (the Grid fix, also in 6.7.359+), attach/detach 31.7 → 12.4 KB. The ratios are smaller than on desktop, and I haven't profiled the interpreter closely enough to tell you exactly why, so I won't guess. One reason I can name: text gained the leasta, because the WebAssembly ICU build doesn't export ubrk_setText yet, so the browser still opens a break iterator per string.
First rendered frame from navigation start: 6.7 DOM 960 ms, 6.7 Skia 1,279 ms (1,134-2,090), 7.0 1,191 ms (1,099-1,357), median of 5: Skia to Skia, 7% sooner, with overlapping ranges, so call it "a little sooner".
That's served from the local disk, though, and on WebAssembly the download is most of startup. So I throttled the server to 50 Mbps with 20 ms latency and gave each visit a fresh Chrome profile (cold), then revisited with the same profile (warm), median of 5 each:
| First frame | 6.7 DOM | 6.7 Skia | 7.0 |
|---|---|---|---|
| Cold cache | 1,315 ms | 1,973 ms | 1,727 ms |
| Warm cache | 766 ms | 1,045 ms | 986 ms |
A cold visit costs roughly 1.7x a warm one on every version. 7.0's 5% bigger download doesn't cost it the lead over 6.7 Skia: it's ahead both ways, 12% cold and 6% warm, though the cold ranges overlap (1,429-3,372 vs 1,545-2,025 ms), so read the cold row as "no worse".
If you're coming from the DOM renderer: 7.0 creates a Border 23x faster than it (a Button 7x) and sets properties ~3x faster, still trails it at measuring text (the browser's native text engine), Grid layout and attach/detach, reaches its first frame ~24% later (1,191 vs 960 ms), and costs about 5 MB of brotli on first load. What that buys is the same pixels on every platform.
Lighter packages, faster restores
Performance isn't only what happens when your app runs. It's also what happens when a new teammate clones the repo, when CI restores packages for the hundredth time today, and when your SSD fills up with yet another copy of a UI framework.
One real build instead of twelve
Uno.WinUI |
6.7 | 7.0 | |
|---|---|---|---|
.nupkg (download) |
103.7 MB | 18.9 MB | -82%a |
unpacked (on disk, incl. .nupkg) |
420.4 MB | 73.4 MB | -83% |
lib/ TFM folders |
12 | 4 |
6.7 shipped a separate build of the UI layer for every platform it could render natively (Android views, UIKit on iOS, tvOS and Mac Catalyst, ~26 MB each, times two .NET versions), plus an API-only "Reference" stub, the real Skia build in a side folder, and a DOM renderer. In 7.0 every target renders with Skia, so the native binaries went (part of unoplatform/uno#23484) and unoplatform/uno#23999 folded the Reference flavor into the Skia build: the package's lib/net10.0 is the runtime now. Eleven project heads were deleted along the way (+15 / -1,510 lines), which is the kind of diff that's a joy to review. To be clear: your app doesn't load 82% less codea. This is a download/restore/disk/CI-cache story.
Release builds stop downloading your dev tools
Every Uno Platform app references a few development-time packages implicitly: Hot Design, the App MCP server and the DevServer. In Release they were supposed to be excluded:
Spot the bug? Exclude on an MSBuild item isn't metadata, it's an item operation, so Exclude="all" only removed a file literally named all. The only part that applied was IncludeAssets="None", which hides the assets but keeps the package in the graph, so every Release restore downloaded all three anyway. unoplatform/uno#24408 removes the Release entries. (Breaking for RestoreLockedMode users: Debug and Release graphs now differ.) And since 2021, WebAssembly heads quietly referenced Microsoft.Windows.Compatibility, the meta-package for porting .NET Framework code; unoplatform/uno#24401 deletes it: 56 packages, about half of a blank WASM app's restore graph, including 21 RID-specific native packages for a target that has no RIDs.
A blank app, one head at a time, restored into an empty package folder:
| Head | 6.7 Debuga | 7.0 Debug | 6.7 Releasea | 7.0 Release |
|---|---|---|---|---|
| Desktop | 3.25 GB | 2.16 GB (-34%) | 3.25 GB | 1.61 GB (-50%) |
| WebAssembly | 2.92 GB | 2.74 GB (-6%) | 2.92 GB | 1.79 GB (-39%) |
| Android | 2.31 GB | 1.52 GB (-34%) | 2.31 GB | 0.98 GB (-58%) |
| iOS | 2.09 GB | 1.41 GB (-33%) | 2.09 GB | 0.86 GB (-59%) |
| Windows App SDK | 4.38 GB | 3.76 GB (-14%) | 4.38 GB | 2.84 GB (-35%) |
Yes, gigabytes, for a blank app. The 6.7 Debug and Release columns are identicala, which is the Exclude bug in one glance. On every head: Uno.WinUI -347 MB, and Release drops Hot Design (785 MB) and the DevServer (163 MB). A desktop head also stops downloading SkiaSharp's WebAssembly natives (303 MB). What got bigger: SkiaSharp 4 and HarfBuzzSharp 14 natives (HarfBuzz's Win32 pack 8 → 101 MB) and Uno Platform's ICU packages on WASM and iOS. Uno.Settings.DevServer (231 MB) is still in every Release restore (unoplatform/uno#26555).
What you actually ship
| Blank app, desktop publish, Release | Files | Total | Managed .dll |
Native |
|---|---|---|---|---|
| 6.7 | 115 | 155.6 MB | 56.7 MB | 92.4 MB |
| 7.0 release | 114 | 141.5 MBa | 33.8 MBb | 101.2 MBc |
For most of the cycle this was 3-4% bigger. Then, two weeks before release, about 24 MB of managed DLLs disappeared from apps that don't use a WebViewb: DirectN.dll (21.9 MB), WebView2.dll (2.5 MB) and DirectN.Extensions.dll, the interop layer behind the WebView2-based WebView on Win32 that every desktop app shipped whether it showed a web page or not. unoplatform/uno#25862 and unoplatform/uno#25996 leave them out unless the app references WebView. The +9 MB of native codec is SkiaSharp 4 and HarfBuzzSharp 14 across six runtime identifiers; publish with a RuntimeIdentifier and you ship one.
On WebAssembly, the naive comparison says 7.0 doubled (brotli 5.2 → 10.2 MB), because 6.7's default DOM renderer links no Skia, HarfBuzz or ICU. Skia to Skia it's 9.7 → 10.2 MB brotli, +5%: SkiaSharp 4 in dotnet.native.wasm and the new drawing-backend assemblies, partly paid back by a smaller Uno.UI.
So here's the sentence I'll write, instead of "7.0 apps are N% smaller": a blank desktop app that doesn't use a WebView publishes 9% smaller than in 6.7a; on WebAssembly, Skia to Skia, it's 5% bigger; and everything around the app got lighter: a Release restore is 35-59% lighter on every head, CI downloads less, and design-time builds do less work (the runtime-asset validator, which opens every copy-local assembly with Cecil, now skips them, unoplatform/uno#24186).
Making a new renderer fast (WebGPU)
The rest of this post compares 7.0 against 6.7. This section can't: 7.0 introduces a new, opt-in drawing backend built on WebGPU (wgpu-native on desktop and mobile, the browser's own navigator.gpu on WebAssembly), alongside Skia, behind the abstraction from #24153. There's no "before", but there is a story: 35 commits prefixed perf(webgpu), all but one by Ramez, each written against a stress scene and each removing a specific kind of waste. Numbers in this section are from the commit messages, measured on the author's machines: timings on the Win32 desktop head unless a bullet names another device, and only comparable within a bullet. Byte and pixel counts don't depend on the machine.
How it renders, in one paragraph. Each frame, Uno Platform turns visuals into recordings: lists of drawing operations. The WebGPU backend turns recordings into GPU work: vertex data for shapes, small per-draw parameter blocks (uniforms: transform, clip, color) packed into big shared buffers (slabs), and draw calls that run shaders over every covered pixel (fragments). Time goes to culling recordings, building vertices, uploading data and shading fragments.
Don't draw what nobody will see. In the MediaWall scene (a grid of image cards), the backend was shading 16.66 megapixels per frame onto a 1.94-megapixel window (the author's window), more than eight layers deep on average, including an opaque full-window white fill that an opaque grey one immediately overwrote. 3ed294cd067 drops draws that a later opaque rectangle fully covers; 1a62dd95483 uses a depth pre-pass as an occlusion accelerator, without reordering draws (painter's order is the visible result in a UI). Culling has to be cheaper than drawing, though: LogView produced 4,698 recordings per frame, and rejecting scrolled-out records 32 at a time (691f7e6a5fa) took its walk from 68.3 to 39.3 ms per 60 frames (1.7x, desktop head).

MediaWall scene: image cards with shadows and scrims, layered deep (7.0, Skia on Vulkan, 120 fps).Do the work once. Identical recordings share one GPU-side entry (fbec4247cf8), each place a recording is replayed gets its own small "stamp" so geometry isn't re-uploaded, and a recording that only moved re-emits its operation list untouched (4b1a883ab5b: LogView stamping 12.6 → 3.6 ms per 60 frames, 3.5x, desktop head).
Upload less. 91ffb49012f uploads only the slab slots that changed, instead of the span from the first change to the last: on an animated dashboard, 446 KB → 63 KB per frame, 7x less. (A follow-up that coalesced dirty slots into runs was reverted. Not every optimization survives contact with real scenes.)

Dashboard scene: animated charts are exactly where per-frame uploads add up (7.0, Skia on Vulkan shown).Build vertices without the garbage. Classic .NET performance work: 32e33d9f575 writes vertices into a span grown once per primitive, where a Gantt chart frame used to push about a million floats through List<float>.Add; be610408a46 keeps the vertex path off generic code Mono can't AOT-compile, which on WebAssembly silently falls back to the interpreter.

GanttSchedule on WebGPU at 120 fps: the kind of scene the vertex-building work was written against.Make the shaders do less. Gradients read their color from a small ramp texture instead of evaluating every stop per fragment (7b39b89129a: RadialGlow 33.2 → 26.7 ms, -20%, on a laptop's Intel UHD 620). Shadows were about half of the MediaWall frame; a card's shadow is now drawn from one blurred shape at the resolution its blur reads.

RadialGlow: per-pixel radial gradients across the whole window. Skia on Vulkan manages 60-70 fps here (60 at the moment of capture); WebGPU holds 120.Frames in flight. Not every fix makes frames faster; some make sure the CPU can't outrun the GPU into a ditch. On a slow device (D3D12 WARP) with a video window on screen, submissions piled up faster than they retired and the process grew by about 1 GB per second until D3D12 removed the device. 685bfb9c058 blocks once more than three frames are outstanding, the same trade-off every game engine makes; 79a0f9385c3 caps the browser's queue too, where a RenderTargetBitmap readback had ended up waiting behind a minute of queued work.
Where WebGPU stands
Same release build, same app, three backends: Skia on Vulkan, Skia on OpenGL, and WebGPU (wgpu on Vulkan), 28 render stress and "real world" scenes at 1920x1080 on an RTX 4090 with a 119 Hz display, three 15-second runs each. Most scenes hit the cap everywhere, so the comparison that matters there is CPU:
| Scene | Skia on Vulkan | Skia on OpenGL | WebGPU |
|---|---|---|---|
| 600 rotated text runs | 12 fps, 89% CPUa | 14 fps, 98% | 120 fps, 22%b |
| Per-pixel radial glow | 68 fps, 60% | 105 fps, 94% | 120 fps, 11% |
| Giant glyphs | 88 fps, 61% | 113 fps, 79% | 120 fps, 12% |
| Map overlay | 73 fps, 60% | 111 fps, 93% | 120 fps, 11% |
| Dashboard | 119 fps, 49% | 120 fps, 62% | 120 fps, 32% |
| Shape swarm | 120 fps, 35% | 120 fps, 40% | 120 fps, 78% ⚠️c |
| Thick polylines | 120 fps, 39% | 120 fps, 42% | 102 fps, 97% |
| Bid leveling (dense data grid) | 107 fps, 99% | 109 fps, 103% | 82 fps, 145% |
These are the 8 scenes where the backends differ; the other 20 run at 119-120 fps on all three. OpenGL's CPU column runs above Vulkan's in almost every scene, as in the idle numbers in the rendering section.


In the scenes where Skia drops frames (rotated text, big glyphs, per-pixel gradients), WebGPU holds the display's rate on 11-22% CPU where Skia needs 60-98%. My guess is that Skia re-rasterizes something in those scenes every frame, but I haven't confirmed it with a GPU capture, so take that as a hypothesis. Where the cost is lots of small CPU-built geometry (the swarm, the dense grid, thick polylines), WebGPU still costs more CPU than Skia, and that's the next thing to work on. Shape swarm is also a regressionc inside the 7.0 cycle (46% → 72% CPU between the October nightly and release, same session, ranges disjoint; 78% in the table's run), not yet attributed. And all of this is one desktop GPU, an RTX 4090, which flatters everybody; I haven't run the table on an integrated GPU.

BidLeveling, the dense data grid: the scene where WebGPU still trails Skia (82 vs 107 fps).WebGPU is opt-in in 7.0, and that's deliberate: a renderer is judged by its worst frame on the weakest device, and the last three rows of that table are not where a default should be. To try it, add the WebGpu Uno Platform Feature and select the backend on the host builder, as described in WebGPU Rendering Backend.
Peanut butter
Toub has a section for the wins that are too small for a theme and too many to skip, spread thinly across everything. Here's ours, limited to things that didn't get a section of their own:
- Reading a property's default value is 30% faster (8.72 → 6.11 ns), and setting then clearing a local value 21% faster (220 → 174 ns).
- An attached-property set and get allocates half as much (24 → 12 B).
- Materializing a
Buttontemplate allocates 19% less (132.8 → 108.0 KB) and is ~10% faster. - Changing
FontSizeon a collapsed panel of 120 elements is 1.4x faster (13.87 → 9.86 μs), and a collapsed or detachedTextBlockno longer pokes the compositor when its text changes.
What's next
As you can see, 7.0 makes a big difference, one you feel immediately once you update your app. However, we are still far from done, and we will keep the performance optimizations coming. For instance:
- Dead animated visuals. Since unoplatform/uno#25187, a composition object suppresses its finalizer unless it has animations attached, so ordinary visuals die like any other object. A visual that is dropped while still animating keeps its finalizer, which queues
StopAllAnimationsonto the UI thread, and it stays alive until the UI thread drains that callback. - Infinite animations under a removed subtree. Removing a subtree only stops animations on its root visual, so an infinite
Storyboardinside a removed panel keeps the compositor requesting frames forever: on 7.0.65 a window idles at 0.2% CPU, at 5.9% with one visible infinite animation, and at 5.4% after the animated element is removed (median of 5 runs of 30 s). unoplatform/uno#25055 parks detached unbounded animations, as WinUI effectively does. AProgressRingin a removed panel already idles on 7.0.65 like an empty window (0.23% vs 0.31%, three 20 s runs each), so it's the animations nothing else stops that #25055 is for. - Frames timed from the host's vsync on Win32 and X11 (unoplatform/uno#24968, #25000, #25003).
- Enum boxes (#25295),
ubrk_setTextfor WebAssembly's ICU, lazy pool bucket tables at startup (#26554), andUno.Settings.DevServerout of Release restores (#26555).
Most of the work in this post was done by the Uno Platform team, and some came from the community: @Youssef1313's boxing PR, opened in 2023, finally landed in 7.0; @daaviid9 made the per-object property dictionaries lazy; @jonpryor removed the WebView2 managed backend; @mikernet measured the 6.7 scrolling regression in the open; and @AtakanUk went after the same font-loading problem we did, independently. Thank you.
Upgrade to 7.0, measure your own app, and if something got slower, tell us. We have a harness now.
Comments 0
No comments yet. Be the first.