Skip to content

[WASM] RichEditBox with 1024 paragraphs takes minutes to load and re-format (runtime test runs 3.5-6.5 min) #26683

Backlog

Description

@MartinZikmund

Current behavior 🐛

The runtime test Given_RichEditBox.When_Local_Paragraph_Format_Changes_Retain_Distant_Paragraph_Inlines (src/Uno.UI.RuntimeTests/Microsoft/UI/Xaml/Controls/Given_RichEditBox.ScalingLayer.skia.cs) takes 3.5 to 6.5 minutes on WebAssembly. It passes, so nothing flags it.

Time from the test's Running test log line to the next test's, in the "Uno.UI - CI" pipeline:

Lane Build Time
WebAssembly Skia, group 0 of 4 248655 (PR) 298 s
WebAssembly Skia, group 0 of 4 248574 (PR) 246 s
WebAssembly Skia Threads, group 4 of 12 248647 (master) 394 s
WebAssembly WebGPU, group 4 of 12 248647 (master) 206 s

The next slowest test in the same shards takes 30 to 40 s.

The test loads 1024 eight-character paragraphs from RTF into a RichEditBox with TextWrapping.NoWrap, waits for idle, changes the paragraph format of one paragraph in the middle, and waits for idle again. Which of the two phases takes the time has not been measured, and neither has the test's duration on the other targets. The Android shard that holds it is about 1.5 min slower than its siblings, which suggests the same cost at a smaller scale.

Effect on CI: this one test is why WebAssembly shard 0 takes about 20 min while the other three take 13 to 16 min (median over 150 PR builds), so it sets the wall time of the WebAssembly test stage and costs about 5 agent-minutes per PR build.

Expected behavior 🎯

Loading and re-formatting a 1024-paragraph document takes seconds, not minutes. If the cost is in RichEditBox layout rather than in the test itself, a document of about a thousand paragraphs is currently unusable on WebAssembly.

How to reproduce it (as minimally and precisely as possible) 🔬

  1. Build the SamplesApp WebAssembly head from master.
  2. Run the runtime test When_Local_Paragraph_Format_Changes_Retain_Distant_Paragraph_Inlines.
  3. Time it.

Or, without the test harness: put a RichEditBox (Width = 420, TextWrapping = NoWrap) in a page, call Document.SetText(TextSetOptions.FormatRtf, rtf) with 1024 short \par-separated paragraphs, then set ParagraphFormat.Alignment on a range in the middle.

Workaround 🛠️

None for the product. For CI, the test is being excluded on WebAssembly until this is resolved.

Affected platforms 📱💻🖥️

WebAssembly (measured). Other platforms not measured.

Uno.Sdk version (and other relevant versions) 📦

master at 00477f6, .NET SDK 11.0.100

IDE version 🧑‍💻

N/A (CI)

Anything else we need to know? 💬

  • Shards are assigned by SHA1(test full name) % groupCount, which puts this test in group 0 of 4 and group 4 of 12. Those are the slow shards in every WebAssembly lane.
  • The NUnit results published to Azure DevOps do not carry real per-test durations (they add up to about 1 min per shard), so the log timestamps are the only source for the numbers above.
  • Related: WASM WebGPU: GPU process crash in RichEditBox tests leaves later screenshots at 0x0 #25210 covers another heavy RichEditBox test on the WebAssembly WebGPU lane.

Activity

  1. added
    kind/bug
    platform/wasm 🌐
    triage/untriaged
    area/performance 📈
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/performance 📈kind/bugplatform/wasm 🌐triage/untriaged

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions