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

Make reading custom attributes in NativeLibrary avoidable #80677

Merged

Conversation

MichalStrehovsky
Copy link
Member

Contributes to #80165.

Unfortunately, the NativeLibrary APIs contain a pattern where one can skip providing a parameter to the API and then something expensive (custom attribute reading) will happen to compute the value. We have a TryLoad call in a hello world that does provide the value (in GlobalizationMode.cs). Make it possible to avoid the expensive thing internally.

cc @dotnet/ilc-contrib

Contributes to dotnet#80165.

Unfortunately, the `NativeLibrary` APIs contain a pattern where one can skip providing a parameter to the API and then something expensive (custom attribute reading) will happen to compute the value. We have a `TryLoad` call in a hello world that does provide the value (in GlobalizationMode.cs). Make it possible to avoid the expensive thing internally.
@ghost
Copy link

ghost commented Jan 16, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

Contributes to #80165.

Unfortunately, the NativeLibrary APIs contain a pattern where one can skip providing a parameter to the API and then something expensive (custom attribute reading) will happen to compute the value. We have a TryLoad call in a hello world that does provide the value (in GlobalizationMode.cs). Make it possible to avoid the expensive thing internally.

cc @dotnet/ilc-contrib

Author: MichalStrehovsky
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: -

@MichalStrehovsky
Copy link
Member Author

The linux arm failure is #80679. Windows x86 looks like an infra issue, but the leg is unrelated.

@MichalStrehovsky MichalStrehovsky merged commit bd84e67 into dotnet:main Jan 16, 2023
@MichalStrehovsky MichalStrehovsky deleted the avoidattributenativelib branch January 16, 2023 09:17
@dotnet dotnet locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants