Skip to content

Avoid recursive XAML view update churn - #285

Open
Happypig375 wants to merge 1 commit into
masterfrom
fix/issue-272-view-update-churn
Open

Avoid recursive XAML view update churn#285
Happypig375 wants to merge 1 commit into
masterfrom
fix/issue-272-view-update-churn

Conversation

@Happypig375

Copy link
Copy Markdown
Collaborator

Summary

  • Guard two-way Content/LaTeX synchronization so one logical update performs one conversion and one measure/visual invalidation instead of recursively serializing and reparsing.
  • Preserve normalized valid LaTeX, retain invalid source text and parse errors, and avoid overwriting Uno binding expressions.
  • Add exact-count Avalonia/MAUI tests, an Uno binding-policy contract test, sustained Avalonia view-update benchmarks, and high-frequency usage guidance.

Validation

  • Independent code review: approved with no blocking findings.
  • XAML behavior suite: 23/23 passed.
  • Uno net10.0 Release build: passed.
  • Benchmark Release build: passed.
  • Avalonia in-process dry benchmark: 6/6 cases completed.
  • Scoped formatter verification and git diff check: passed.

Dry-run directional results on an i5-8400 (.NET 10; one iteration, not a statistical performance claim):

1000 updates Time Allocated
LaTeX assignment 301.174 ms 36,173.99 KB
Content assignment 94.606 ms 29,596.33 KB
Direct painter reuse 2.535 ms 1,649.33 KB

Uno test scope

The test verifies the strongly typed BindingExpression decision contract and the real Uno project compiles. This repository does not currently contain an Uno RuntimeTests app/platform host, which Uno requires for exercising actual controls: https://platform.uno/docs/articles/uno-development/creating-runtime-tests.html

Cost and compatibility

The guard removes duplicate work. The diagnostic seam is internal, state-free, and test-only through InternalsVisibleTo; it adds one negligible virtual call per logical update and no public API.

Fixes #272.

@Happypig375 Happypig375 added Type/Enhancement A concrete change to CSharpMath behavior or capability. Area/Rendering Typesetting, measurement, fonts, text layout, and drawing. labels Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area/Rendering Typesetting, measurement, fonts, text layout, and drawing. Type/Enhancement A concrete change to CSharpMath behavior or capability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid serialize-reparse churn during frequent view updates

1 participant