Skip to content
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

Move ActivationFactory into WinRT.Runtime.dll #1390

Merged
merged 5 commits into from
Jan 25, 2024

Conversation

jlaanstra
Copy link
Collaborator

This enables additional optimizations that couldn't be done in #1375

@jlaanstra jlaanstra changed the title Move ActivationFacory into WinRT.Runtime.dll Move ActivationFactory into WinRT.Runtime.dll Nov 18, 2023
Copy link
Member

@Sergio0694 Sergio0694 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments 🙂

src/WinRT.Runtime/ActivationFactory.cs Show resolved Hide resolved
src/WinRT.Runtime/ActivationFactory.cs Outdated Show resolved Hide resolved
src/WinRT.Runtime/ActivationFactory.cs Outdated Show resolved Hide resolved
src/WinRT.Runtime/ActivationFactory.cs Outdated Show resolved Hide resolved
src/WinRT.Runtime/ActivationFactory.cs Outdated Show resolved Hide resolved
src/WinRT.Runtime/ActivationFactory.cs Outdated Show resolved Hide resolved
src/WinRT.Runtime/ActivationFactory.cs Outdated Show resolved Hide resolved
src/WinRT.Runtime/Context.cs Outdated Show resolved Hide resolved
src/WinRT.Runtime/ActivationFactory.cs Show resolved Hide resolved
src/WinRT.Runtime/ActivationFactory.cs Outdated Show resolved Hide resolved
@Sergio0694
Copy link
Member

Just a couple nits but I do love this PR, and the fact ActivationFactory.Get(string) is now public! 🎉

Copy link
Member

@Sergio0694 Sergio0694 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done another review pass on the updated diff 🙂

src/WinRT.Runtime/ActivationFactory.cs Outdated Show resolved Hide resolved
src/WinRT.Runtime/ActivationFactory.cs Show resolved Hide resolved
src/WinRT.Runtime/ActivationFactory.cs Outdated Show resolved Hide resolved
src/WinRT.Runtime/ActivationFactory.cs Outdated Show resolved Hide resolved
src/WinRT.Runtime/ActivationFactory.cs Outdated Show resolved Hide resolved
Copy link
Member

@Sergio0694 Sergio0694 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP IT! :shipit:


public static bool TryLoad(string fileName, out DllModule module)
{
lock (_cache)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is now more likely that we see parallel calls here due to different threads activating different types. Given these are already cached too, it shouldn't have too much of an impact, but will need to monitor perf traces to see if this shows up and if we need to improve the locking here. But for now, this is fine.

@jlaanstra jlaanstra merged commit 02e8556 into microsoft:staging/AOT Jan 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants