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

feat: lazy parallel loading of lightning address data #150

Merged
merged 1 commit into from
Oct 20, 2024

Conversation

matjaz
Copy link
Contributor

@matjaz matjaz commented Aug 5, 2024

  • parallel loading without proxy
  • lazy load only required data (no need to load all three)

for proxy usage there is no change.

@bumi bumi requested a review from im-adithya August 5, 2024 14:47
@bumi
Copy link
Contributor

bumi commented Aug 5, 2024

that looks good! tanks for the pr

@@ -75,31 +75,45 @@ export default class LightningAddress {
);
const json = await result.json();

await this.parseResponse(json.lnurlp, json.keysend, json.nostr);
await this.parseLnUrlPayResponse(json.lnurlp);
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this one async and the others aren't? did you miss something in your refactoring?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No I haven't. Good eye. First one uses utils await parseLnUrlPayResponse() because sha256 is async. Others doesn't have async code.

Copy link
Contributor

@rolznz rolznz left a comment

Choose a reason for hiding this comment

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

utACK

@rolznz rolznz merged commit 3eaa6a3 into getAlby:master Oct 20, 2024
3 checks passed
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