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

Fix subscriptions slow to update #54

Merged
merged 1 commit into from
Nov 14, 2023
Merged

Fix subscriptions slow to update #54

merged 1 commit into from
Nov 14, 2023

Conversation

boreq
Copy link
Contributor

@boreq boreq commented Nov 14, 2023

The problem was that we only sent out info about new subs to relays every 10 seconds. So in the worst scenario of creating subscriptions sequentially like with purple pages we had to wait 10 seconds per subscription.

I am very tired but I think there is an invariant in this code that new channel is only created when there is no need for an update therefore we won't end up in the situation where channel is closed but no update happens? We can therefore drop time.After completely.

The problem was that we only sent out info about new subs to relays
every 10 seconds. So in the worst scenario of creating subscriptions
sequentially like with purple pages we had to wait 10 seconds per
subscription.

I am very tired but I think there is an invariant in this code that new
channel is only created when there is no need for an update therefore we
won't end up in the situation where channel is closed but no update
happens? We can therefore drop time.After completely.
@boreq
Copy link
Contributor Author

boreq commented Nov 14, 2023

This could be a fix for #48.

@boreq boreq merged commit b78cf27 into main Nov 14, 2023
1 check passed
@boreq boreq deleted the fix-relay-lookup-bug branch November 14, 2023 21:03
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.

1 participant