-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Labels
Comments
dgrunwald
referenced
this issue
Nov 2, 2018
siegfriedpammer
added a commit
that referenced
this issue
Jan 28, 2022
siegfriedpammer
added a commit
that referenced
this issue
Feb 5, 2022
siegfriedpammer
added a commit
that referenced
this issue
Mar 7, 2022
7 tasks
Fixed by #2765 |
hexafluoride
pushed a commit
to hexafluoride/ILSpy
that referenced
this issue
Aug 31, 2022
…e and GetAttribute to IEntity.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 callingGetAttributes()
for the target of every call.The text was updated successfully, but these errors were encountered: