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

Optimize Permission handling on ui #2912

Merged
merged 2 commits into from
Feb 14, 2024
Merged

Optimize Permission handling on ui #2912

merged 2 commits into from
Feb 14, 2024

Conversation

chrisknoll
Copy link
Collaborator

This PR starts to address the issues raised in #2908.

To test, there was a button added on configuration and will attempt to run all isPermittedXXX() methods on authAPI, and report the elapsed time.

The timings for old vs new are:

-- Origional code

Script execution time: 5.400000095367432 milliseconds
configuration.js:278 Script execution time: 4.100000023841858 milliseconds
configuration.js:278 Script execution time: 3.600000023841858 milliseconds
configuration.js:278 Script execution time: 4 milliseconds
configuration.js:278 Script execution time: 3.799999952316284 milliseconds
configuration.js:278 Script execution time: 3.9000000953674316 milliseconds
configuration.js:278 Script execution time: 3.399999976158142 milliseconds
configuration.js:278 Script execution time: 3.3000000715255737 milliseconds

--- New Code

Script execution time: 0.5 milliseconds
configuration.js:278 Script execution time: 0.7000000476837158 milliseconds
configuration.js:278 Script execution time: 0.3999999761581421 milliseconds
configuration.js:278 Script execution time: 0.3999999761581421 milliseconds
configuration.js:278 Script execution time: 0.3999999761581421 milliseconds
configuration.js:278 Script execution time: 0.5 milliseconds
configuration.js:278 Script execution time: 0.40000009536743164 milliseconds

Shows a 5 to 10-fold increase in performance.

Copy link
Collaborator

@anthonysena anthonysena left a comment

Choose a reason for hiding this comment

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

Looks good from review on the Atlas WG call

@chrisknoll chrisknoll merged commit dd9e49e into master Feb 14, 2024
2 checks passed
@delete-merged-branch delete-merged-branch bot deleted the perms-optimize branch February 14, 2024 00:09
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.

2 participants