Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Improve XAMLC Compilation performance #1848

Closed
jassmith opened this issue Feb 8, 2018 · 0 comments · Fixed by #1875
Closed

Improve XAMLC Compilation performance #1848

jassmith opened this issue Feb 8, 2018 · 0 comments · Fixed by #1875

Comments

@jassmith
Copy link

jassmith commented Feb 8, 2018

No idea how, stephane can figure that out. The goal is just to profile and improve XAMLC performance.

StephaneDelcroix added a commit that referenced this issue Feb 13, 2018
ImportReference with System.Reflection based argument is notoriously
slow on .NET. So we cache the results for those.

We do not cache the results for TypeReference, MethodReference or
FieldReference calls, as those are already fast (passthrough if the
reference was already imported), and they aren't valid as dictionary
keys (no concept of equatability).

While we're at it, we shave another few ms from Resolve(TypeReference)
calls as well.

As, on good days, it shaves up to 40% of XamlC time, we can say that it

 - fixes #1848
StephaneDelcroix added a commit that referenced this issue Feb 13, 2018
ImportReference with System.Reflection based argument is notoriously
slow on .NET. So we cache the results for those.

We do not cache the results for TypeReference, MethodReference or
FieldReference calls, as those are already fast (passthrough if the
reference was already imported), and they aren't valid as dictionary
keys (no concept of equatability).

While we're at it, we shave another few ms from Resolve(TypeReference)
calls as well.

As, on good days, it shaves up to 40% of XamlC time, we can say that it

 - fixes #1848
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants