Skip to content

Skip the duplicate Loading-time theme reference pass #25405

Open

Description

@MartinZikmund

What would you like to be added? 💡

Skip the Loading-time UpdateAllThemeReferences pass for elements whose theme references were all resolved against their live ancestors at Enter.

Why is this needed? 🤔

FrameworkElement.OnLoadingPartial re-runs UpdateAllThemeReferences on every element right after Enter has already done it. WinUI only does it at Enter (depends.cpp:1056-1060). For an element with dozens of theme references, such as the ListViewItemPresenter adopted in #25389 (41 per container), the duplicate pass is about 20% of a GridView's first-frame CPU.

For which platforms 📱💻🖥️

Skia (all heads)

Anything else we need to know? 💬

Split out of #25396, which keeps the allocation side.

Activity

  1. added
    7.1
    on Oct 14, 2026
  2. removed
    7.1
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/performancekind/enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions