dotnet / dotnet/runtime

[ios-clr] R2R compile XAML-generated methods in Debug using MIBC crossgen2

Open
#126,194 1 comment 0 reactions 2 assignees Claimed by @jkoritzinsky View on GitHub
area-ReadyToRun os-ios
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

## Description

In Debug, non-user assemblies are compiled into an R2R composite image, while user assemblies are excluded via PublishReadyToRunExclude and left interpreted. XAML-generated logic (primarily InitializeComponent methods) might be slow and could benefit from R2R compilation.

To address this without invalidating the existing composite cache, a new tool in MAUI generates a MIBC file that lists only the methods produced by the XAML compilers. The idea is to produces a separate, smaller R2R image containing only XAML-generated methods, keeping it distinct from the R2R composite so that it can be invalidated and regenerated independently on rebuild.

### Tasks
- [x] Ensure the new image contains only XAML methods and does not overlap with the non-user composite
- [x] Ensure only the small R2R image is regenerated on rebuild when XAML changes
- [x] Measure build time, size, and startup impact
- [ ] https://github.com/dotnet/maui/pull/34837

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.