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

Use typeof(DllModule).Assembly for faster resolution #1475

Merged
merged 1 commit into from
Jan 27, 2024

Conversation

Sergio0694
Copy link
Member

Now that ActivationFactory is in WinRT.Runtime, we can use typeof(Foo).Assembly for faster resolution.

@Sergio0694 Sergio0694 added performance Related to performance work AOT labels Jan 26, 2024
@jlaanstra
Copy link
Collaborator

jlaanstra commented Jan 26, 2024

On a related note, this is a change in behavior from the ActivationFactory PR. Does it matter what Assembly we pass here?

@Sergio0694
Copy link
Member Author

"this is a change in behavior from the ActivationFactory PR. Does it matter what Assembly we pass here?"

Yeah I think that PR did change the behavior there. I can't really imagine what difference that would make though, other than... Maybe like, you have an app that's dynamically loading some plugin .dll that's in some other folder, and that .dll tries to activate some WinRT type that's in a .dll that's next to that .dll, and not to your app's .dll? Not sure if that matters? 🤔

@manodasanW
Copy link
Member

"this is a change in behavior from the ActivationFactory PR. Does it matter what Assembly we pass here?"

Yeah I think that PR did change the behavior there. I can't really imagine what difference that would make though, other than... Maybe like, you have an app that's dynamically loading some plugin .dll that's in some other folder, and that .dll tries to activate some WinRT type that's in a .dll that's next to that .dll, and not to your app's .dll? Not sure if that matters? 🤔

Yea I can see maybe some plugin scenarios being impacted. Will need to monitor for any failures or reports. The change to AppContext.BaseDirectory from several releases ago was more likely to run into similar issues here but never got any reports there.

@Sergio0694 Sergio0694 merged commit 15ac57e into staging/AOT Jan 27, 2024
9 checks passed
@Sergio0694 Sergio0694 deleted the user/sergiopedri/faster-get-assembly branch January 27, 2024 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AOT performance Related to performance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants