Very low Text Rendering Performance due native C++ interop
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
* .NET Core Version: 5.0.6
* Windows version: 21H1 (Build 19043.928)
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes
* Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)?: No
**Problem description:**
UIElement.Measure this very slow
**Actual behavior:**

**Expected behavior:**
Fast measuring for WPF rendering.
If there is nothing more that can be optimized in the measure method, it might make sense to cache the measures according to certain parameters, since this is very slow with large visual trees.
Compared to Windows Forms, Windows Forms is superior in terms of performance here.
Would it not make sense to write the measure method in native C++ somehow to optimize the performance accordingly or is the overhead here too large?
**Minimal repro:**
```xaml
Test
Test
Test
Test
Test
Test
```
Contributor guide
Assessment
This issue has not been assessed yet.