New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[X] Simplify XamlServiceProvider setup code generated by XamlC when invoking markup extensions #19650
Labels
area-xaml
XAML, CSS, Triggers, Behaviors
fixed-in-9.0.0-preview.2.10247
fixed-in-9.0.0-preview.2.10293
t/perf
The issue affects performance (runtime speed, memory usage, startup time, etc.)
Comments
we should also warn if a converter doesn't have any attribute |
StephaneDelcroix
added a commit
that referenced
this issue
Jan 17, 2024
MarkupExtensions, ValueProviders and some TypeConverters require a serviceProvider. Only add the services that are actually required. This will reduce IL size, time to JIT, number of allocations, ... Also add a warning when users do not attribute their MarkupExctensions - fixes #19650
github-actions bot
pushed a commit
that referenced
this issue
Jan 19, 2024
MarkupExtensions, ValueProviders and some TypeConverters require a serviceProvider. Only add the services that are actually required. This will reduce IL size, time to JIT, number of allocations, ... Also add a warning when users do not attribute their MarkupExctensions - fixes #19650
StephaneDelcroix
added a commit
that referenced
this issue
Jan 19, 2024
MarkupExtensions, ValueProviders and some TypeConverters require a serviceProvider. Only add the services that are actually required. This will reduce IL size, time to JIT, number of allocations, ... Also add a warning when users do not attribute their MarkupExctensions - fixes #19650
github-actions bot
pushed a commit
that referenced
this issue
Feb 12, 2024
MarkupExtensions, ValueProviders and some TypeConverters require a serviceProvider. Only add the services that are actually required. This will reduce IL size, time to JIT, number of allocations, ... Also add a warning when users do not attribute their MarkupExctensions - fixes #19650
StephaneDelcroix
added a commit
that referenced
this issue
Feb 13, 2024
MarkupExtensions, ValueProviders and some TypeConverters require a serviceProvider. Only add the services that are actually required. This will reduce IL size, time to JIT, number of allocations, ... Also add a warning when users do not attribute their MarkupExctensions - fixes #19650
StephaneDelcroix
added a commit
that referenced
this issue
Feb 14, 2024
MarkupExtensions, ValueProviders and some TypeConverters require a serviceProvider. Only add the services that are actually required. This will reduce IL size, time to JIT, number of allocations, ... Also add a warning when users do not attribute their MarkupExctensions - fixes #19650
Implementation merged into |
Eilon
added
t/perf
The issue affects performance (runtime speed, memory usage, startup time, etc.)
and removed
area-perf
Startup / Runtime performance
labels
May 10, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area-xaml
XAML, CSS, Triggers, Behaviors
fixed-in-9.0.0-preview.2.10247
fixed-in-9.0.0-preview.2.10293
t/perf
The issue affects performance (runtime speed, memory usage, startup time, etc.)
The IL generated by XamlC to prepare an instance of
XamlServiceProvider
for a call toIMarkupExtension.ProvideValue
often contains unnecessary services. For example, the generated code creates a new instance ofXamlTypeResolver
whenever we callConstraintExpression
,DynamicResourceExtension
,ReferenceExtension
, orStaticResourceExtension
, but none of these extensions uses it.We already have the
[AcceptEmptyServiceProvider]
attribute to optimize the service provider for some extensions. We could add a new attribute[RequiredService(typeof(IXmlLineInfoProvider))]
which would be used byXamlC
to prepare only the services which are actually needed./cc @StephaneDelcroix
The text was updated successfully, but these errors were encountered: