Skip to content

[tools] Enable the 'InlineIsDirectBinding' optimization by default for all platforms. - #26496

Open
rolfbjarne wants to merge 2 commits into
mainfrom
dev/rolf/inline-isdirectbinding-by-default
Open

[tools] Enable the 'InlineIsDirectBinding' optimization by default for all platforms.#26496
rolfbjarne wants to merge 2 commits into
mainfrom
dev/rolf/inline-isdirectbinding-by-default

Conversation

@rolfbjarne

@rolfbjarne rolfbjarne commented Aug 28, 2026

Copy link
Copy Markdown
Member

It's not possible to load external (unknown at build time) assemblies in .NET, so this shouldn't be a problem.

Also I can't see why using the interpreter would cause any problems, so remove that condition too.

Fixes #6046.

…r all platforms.

It's not possible to load external (unknown at build time) assemblies in .NET, so this shouldn't be a problem.

Also I can't see why using the interpreter would cause any problems, so remove that condition too.
Copilot AI lite review requested due to automatic review settings August 28, 2026 15:45
@rolfbjarne
rolfbjarne requested a review from dalexsoto as a code owner August 28, 2026 15:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes the default optimization settings in the bundler toolchain so that inline-isdirectbinding is enabled by default across all Apple platforms, removing the previous platform- and interpreter-based gating.

Changes:

  • Make InlineIsDirectBinding default to true unconditionally.
  • Remove the previous conditional logic that disabled the optimization on macOS and when the interpreter is enabled.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread tools/common/Optimizations.cs
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: c1c9442b314751b83e45b94be30bff7d94e45920 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [CI Build #c1c9442] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

0 tests crashed, 5 tests failed, 200 tests passed.

Failures

❌ dotnettests tests (iOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.AppSizeTest.MonoVM_Interpreter(iOS,"ios-arm64"): APIs were unexpectedly removed from the preserved set. The updated expected file is available as a build artifact (set WRITE_K...

Html Report (VSDrops) Download

❌ dotnettests tests (MacCatalyst)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.AppSizeTest.MonoVM_Interpreter(MacCatalyst,"maccat...: APIs were unexpectedly removed from the preserved set. The updated expected file is available as a build artifact (set WRITE_K...

Html Report (VSDrops) Download

❌ dotnettests tests (macOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.AppSizeTest.NativeAOT_TrimmableStatic(MacOSX,"osx-...: App size changed significantly (-33,002 bytes (-32.2 KB = -0.0 MB) different > tolerance of +-10,240 bytes (10.0 KB = 0.0 MB)). ...

Html Report (VSDrops) Download

❌ dotnettests tests (tvOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.AppSizeTest.MonoVM_Interpreter(TVOS,"tvos-arm64"): APIs were unexpectedly removed from the preserved set. The updated expected file is available as a build artifact (set WRITE_K...

Html Report (VSDrops) Download

❌ windows tests

1 tests failed, 2 tests passed.

Failed tests

  • Remote .NET tests/Xamarin.Tests.DotNetProjectTest.AppWithLibraryWithResourcesReferenceOnRemoteWindows(iOS,"ios-arm64",False): Failed: 'dotnet build' timed out after 00:10:00

Html Report (VSDrops) Download

Successes

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 19 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 19 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: c1c9442b314751b83e45b94be30bff7d94e45920 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

⚠️ AppSizeTest expected files changed ⚠️

The AppSizeTest detected changes in the expected app size files.

To update the expected files, add a comment with the following command:

/apply-gist https://gist.github.com/vs-mobiletools-engineering-service2/a951a2aac5efb34d613478a588c6659a
Updated files
  • iOS-MonoVM-interpreter-preservedapis.txt
  • MacCatalyst-MonoVM-interpreter-preservedapis.txt
  • MacOSX-NativeAOT-TrimmableStatic-size.txt
  • TVOS-MonoVM-interpreter-preservedapis.txt

Pipeline on Agent
Hash: c1c9442b314751b83e45b94be30bff7d94e45920 [PR build]

@rolfbjarne

Copy link
Copy Markdown
Member Author

/apply-gist https://gist.github.com/vs-mobiletools-engineering-service2/a951a2aac5efb34d613478a588c6659a

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

✅ Applied expected app size files from gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC] Possibly port IsDirectBinding optimization to Mac

3 participants