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

Use a promise.allSettle instead of a for loop that resolves one at a time #883

Merged
merged 7 commits into from
Jul 2, 2024

Conversation

nturinski
Copy link
Member

@nturinski nturinski commented Jun 28, 2024

We talked about this in stand up and I wanted to see if the performance boost was significant. Not surprisingly, it's an exponential performance boost, as in, the more resources you have, the better the improvement.

Functions has a weird bug right now that is hitting performance harder that I've fixed and will be putting up a PR for. It's making it take even longer, but it illustrates how much faster the promises are compared to the loop.

EDIT: left is the changes, right is the current release.

resources promiseAllSettleShort

@nturinski nturinski requested a review from a team as a code owner June 28, 2024 00:23
@@ -125,7 +125,8 @@ export class GroupingItem implements ResourceGroupsItem {
} catch (e) {
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't have to be this PR but:

  • We should log this error.
  • And make sure it gets reported to telemetry.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oddly, this command doesn't pass in a context. It's a slightly bigger change to start pushing in a context everywhere for error telemetry, so I'll just log to output channel for now.

alexweininger
alexweininger previously approved these changes Jun 28, 2024
alexweininger
alexweininger previously approved these changes Jun 28, 2024
@nturinski nturinski merged commit affcda6 into main Jul 2, 2024
3 checks passed
@nturinski nturinski deleted the nat/promiseAllSettle branch July 2, 2024 20:13
@microsoft microsoft locked and limited conversation to collaborators Aug 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants