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

Performance: HasAttribute/GetAttribute #1204

Closed
dgrunwald opened this issue Jul 14, 2018 · 1 comment
Closed

Performance: HasAttribute/GetAttribute #1204

dgrunwald opened this issue Jul 14, 2018 · 1 comment

Comments

@dgrunwald
Copy link
Member

Currently, every HasAttribute / GetAttribute call ends up decoding all attributes applied to the target entity. While custom attributes are relatively cheap (their argument values are only decoded at a later point); security declarations are expensive as they require full decoding of the permission blob.

But most of the known attributes cannot occur within security declarations, so a HasAttribute / GetAttribute check for them performs lots of redundant work.

This is especially relevant for AddDefinesForConditionalAttributes, which currently ends up calling GetAttributes() for the target of every call.

siegfriedpammer added a commit that referenced this issue Jul 16, 2022
dgrunwald pushed a commit that referenced this issue Jul 16, 2022
siegfriedpammer added a commit that referenced this issue Aug 24, 2022
@siegfriedpammer
Copy link
Member

Fixed by #2765

hexafluoride pushed a commit to hexafluoride/ILSpy that referenced this issue Aug 31, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants