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

perf(permissions): Fast exit from checks when permission is in "fully-granted" state #22894

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

mmastrac
Copy link
Contributor

@mmastrac mmastrac commented Mar 13, 2024

Skips the access check if the specific unary permission is in an all-granted state. Generally prevents an allocation or two.

Hooks up a quiet "all" permission that is automatically inherited. This permission will be used in the future to indicate that the user wishes to accept all side-effects of the permissions they explicitly granted.

The "all" permission is an "ambient flag"-style permission that states whether "allow-all" was passed on the command-line.

@mmastrac mmastrac force-pushed the allow_all_optimization branch from 635200a to 9f9c960 Compare March 13, 2024 16:12
@mmastrac mmastrac changed the title perf(permissions): Fast exit from checks when permission is in "allow-all" state perf(permissions): Fast exit from checks when permission is in "fully-granted" state Mar 13, 2024
@mmastrac mmastrac force-pushed the allow_all_optimization branch from 6418702 to d541193 Compare March 13, 2024 18:23
@mmastrac mmastrac requested a review from dsherret March 13, 2024 18:34
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM!

@mmastrac mmastrac merged commit c9a9d04 into denoland:main Mar 13, 2024
17 checks passed
nathanwhit pushed a commit that referenced this pull request Mar 14, 2024
…-granted" state (#22894)

Skips the access check if the specific unary permission is in an
all-granted state. Generally prevents an allocation or two.

Hooks up a quiet "all" permission that is automatically inherited. This
permission will be used in the future to indicate that the user wishes
to accept all side-effects of the permissions they explicitly granted.

The "all" permission is an "ambient flag"-style permission that states
whether "allow-all" was passed on the command-line.
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