You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[.net 11] Lazy ResourceDictionary factories are resolved during VisualElement resource propagation #35500
area-xamlXAML, CSS, Triggers, Behaviorspartner/syncfusionIssues / PR's with Syncfusion collaborations/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working
Lazy ResourceDictionary values are getting resolved during resource propagation
I noticed a likely oversight in the .NET 11 lazy ResourceDictionary work: some VisualElement resource propagation paths still enumerate resource key/value pairs, which resolves lazy resources even when the resource is never requested.
One caveat: the final fix should preserve existing behavior for null-valued resources, since the current key-based resolver path can skip null.
Impact
I ran a quick BenchmarkDotNet comparison against a prototype fix:
Scenario
Current net11.0
Prototype fix
Assign 2,000 lazy resources
10.59 ms / 4.32 MB
0.631 ms / 0.65 MB
Assign 5,000 lazy resources
28.66 ms / 10.71 MB
1.89 ms / 1.54 MB
Parent 100 views, 20 lazy/view
27.85 ms / 39.3 MB
17.17 ms / 35.6 MB
Parent 200 views, 20 lazy/view
51.97 ms / 77.8 MB
39.84 ms / 70.5 MB
Parent 200 views, 50 lazy/view
157.61 ms / 177.6 MB
108.98 ms / 159.6 MB
So this looks like it can materially reduce the benefit of lazy resources in larger apps with thousands of resources or pages that materialize lots of views at once.
Closed by #37257 (merged to net11.0). GitHub only auto-closes for PRs merged to the default branch; this issue was fixed by a PR merged to a non-default branch.
area-xamlXAML, CSS, Triggers, Behaviorspartner/syncfusionIssues / PR's with Syncfusion collaborations/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working
Activity
TamilarasanSF4853 commentedon May 18, 2026
This issue has been validated in Visual Studio Code 1.120.0 with the net11 branch. The issue was reproducible.
[net11] ResourceDictionary: Preserve lazy factories during resource p…
github-actions commentedon Aug 12, 2026
Closed by #37257 (merged to
net11.0). GitHub only auto-closes for PRs merged to the default branch; this issue was fixed by a PR merged to a non-default branch.