Skip to content

Continuous GC logs on TabbedPage in MAUI 10.0.30 #33731

@kellymmcd

Description

@kellymmcd

Description

After upgrading Microsoft.Maui.Controls from 10.0.10 to 10.0.30, a TabbedPage with two or more tabs on Android triggers continuous GC logs while idle, even when the tab content is static.

This behavior does not occur in 10.0.10 and appears to be a regression introduced in 10.0.30.

In our production app, after upgrading to .NET 10 with this Controls version, we also observe noticeable scroll lag in a complex CollectionView inside a TabbedPage (Release build). The increased and continuous GC activity may be contributing to this performance regression.

Steps to Reproduce

  1. Create a new MAUI app.
  2. Update MAUI controls if not already on 10.0.30
    <PackageReference Include="Microsoft.Maui.Controls" Version="10.0.30" />
  3. Replace MainPage.xaml with the following minimal XAML and set app to open on this page
<TabbedPage
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    x:Class="MauiApp1.MainPage">

    <ContentPage Title="Tab 1">
        <Grid>
            <Label
                Text="Tab 1"
                HorizontalOptions="Center"
                VerticalOptions="Center"
                FontSize="24" />
        </Grid>
    </ContentPage>

    <ContentPage Title="Tab 2">
        <Grid>
            <Label
                Text="Tab 2"
                HorizontalOptions="Center"
                VerticalOptions="Center"
                FontSize="24" />
        </Grid>
    </ContentPage>

</TabbedPage>
  1. Deploy the app to an Android device or emulator.
  2. Observe the output logs — you will see repeated GC messages every second, such as:
Explicit concurrent mark compact GC freed 2172KB AllocSpace bytes, 0(0B) LOS objects, 49% free, 3820KB/7640KB, paused 551us,1.057ms total 9.091ms
Explicit concurrent mark compact GC freed 2176KB AllocSpace bytes, 0(0B) LOS objects, 49% free, 3820KB/7640KB, paused 608us,924us total 8.487ms
Explicit concurrent mark compact GC freed 2172KB AllocSpace bytes, 0(0B) LOS objects, 49% free, 3824KB/7648KB, paused 565us,1.257ms total 9.035ms
Explicit concurrent mark compact GC freed 2176KB AllocSpace bytes, 0(0B) LOS objects, 49% free, 3824KB/7648KB, paused 837us,944us total 9.009ms

Expected Behavior:

  • GC should only run when necessary.
  • A simple TabbedPage should not trigger continuous GC.

Actual Behavior:

  • Continuous GC logs appear.
  • Potentially contributes to UI lag, especially for CollectionView scrolling.
  • Only occurs after updating to MAUI 10.0.30; does not occur in 10.0.10.

Link to public reproduction project repository

No response

Version with bug

10.0.30

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

10.0.10

Affected platforms

Android

Affected platform versions

Android 16

Did you find any workaround?

Rolling back to 10.0.10 eliminates the issue.

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions