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

Resolve facets in parallel #2957

Merged
merged 2 commits into from
Nov 8, 2024
Merged

Resolve facets in parallel #2957

merged 2 commits into from
Nov 8, 2024

Conversation

gaearon
Copy link
Contributor

@gaearon gaearon commented Nov 7, 2024

There's no great reason for these to be a sequential client-server waterfall, let's grab them all together.

Ref: https://bsky.app/profile/aaronmcadam.com/post/3laevl2d33y2h

Before

Screenshot 2024-11-07 at 18 46 00

After

Screenshot 2024-11-07 at 18 49 45

@gaearon gaearon changed the title Resolve facets parallel Resolve facets in parallel Nov 7, 2024
agent.com.atproto.identity
.resolveHandle({ handle: feature.did })
.then((res) => res?.data.did)
.catch((_) => undefined)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved this below for clarity (it's supposed to protect the last step)

}
}
}
await Promise.allSettled(promises)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these can't fail atm but this better reflects what we want

Copy link
Collaborator

@devinivy devinivy left a comment

Choose a reason for hiding this comment

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

Good call 👍

@gaearon gaearon merged commit b6eeb81 into main Nov 8, 2024
10 checks passed
@gaearon gaearon deleted the resolve-facets-parallel branch November 8, 2024 00:27
@github-actions github-actions bot mentioned this pull request Nov 8, 2024
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