-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Boost AAD performance by replacing Cmdlets with slow load times #1196
Conversation
For reviewers: How to test the performance improvementThe performance improvement when running AAD is mostly noticeable when the tool executes for the first time in a newly spawned Powershell window. This is because the slowness that we observed in the Microsoft.Graph.Beta.Identity.Governance dll was during its load into memory, which occurs only the first time you call one of its Cmdlets in a new Powershell window. Use this code to take a time measurement (tailor the parameter values to your environment):
|
@julianjburgos Test against the E5 tenant Follow the instructions in the prior comment above. |
Averages:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment about average times, the time for the G3 tenant on average was slightly slower in testing
The Powershell code that was optimized affects tenants that are G5 and above. |
Averages:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look at comment above with average times for E5
@nanda-katikaneni ready for merge testing. |
🗣 Description
*This PR replaces #1094 which became too difficult to deal with since there were heavy merge conflicts - reference that PR for additional details.
The gist of this pull request was to modify the AAD provider so that we replace the Cmdlets in the Microsoft.Graph.Beta.Identity.Governance Powershell module with direct calls to MS Graph REST APIs. We found that the offending Powershell module takes a significant amount of time to load into memory when you call ScubaGear the first time in a fresh Powershell window. The good news was that the RESP API returns the same fields as the Cmdlet, except that the field names begin with a lower case letter so that is why you see those respective changes in the Rego and unit/functional tests as well as references in the AAD provider.
closes #816
🧪 Testing
The original code changes were tested against the E5, G5, G3 and GCC High tenants. Additional testing should be done by the reviewers to ensure the code performs as expected and doesn't crash.
✅ Pre-approval checklist
✅ Pre-merge checklist
PR passed smoke test check.
Feature branch has been rebased against changes from parent branch, as needed
Use
Rebase branch
button below or use this reference to rebase from the command line.Resolved all merge conflicts on branch
Notified merge coordinator that PR is ready for merge via comment mention
✅ Post-merge checklist