Skip to content

Reduce resizes in SpecializedResourceDictionary #18088

Description

@Youssef1313

What would you like to be added

When ResourceDictionary is created from XAML-generated code, the number of elements should already be known by XAML generator.

We should add an overload of ResourceDictionary constructor that accepts initialCapacity parameter, which is then reflected in the inner SpecializedResourceDictionary (ResourceDictionary._values)

Why is this needed

Perf

image

For which platform

No response

Anything else we need to know?

No response

Activity

  1. added
    kind/enhancement
    triage/untriaged
    difficulty/tbd
    area/performance 📈
    project/resources 🈷️
    area/code-generation
    on Aug 31, 2024
  2. github-actions commented on Sep 1, 2025

    @github-actions
    Contributor

    Hey there — just a heads-up that this issue has been quiet for over a year. If there’s no update or comment in the next 10 days, it’ll be closed automatically. Feel free to remove the stale label or drop a note to keep it open.

  3. added
    stale
    on Sep 1, 2025
  4. MartinZikmund commented on Sep 2, 2025

    @MartinZikmund
    Member

    Needed

  5. removed
    stale
    on Sep 2, 2025
  6. added
    difficulty/medium 🤔
    and removed
    difficulty/tbd
    triage/untriaged
    on Nov 24, 2025
  7. github-actions commented on May 7, 2026

    @github-actions
    Contributor

    This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.

  8. added
    stale
    on May 7, 2026
  9. removed
    stale
    on May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/code-generationarea/performance 📈difficulty/medium 🤔kind/enhancementproject/resources 🈷️

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions