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

Improve offer publishing #4950

Merged
merged 7 commits into from
Dec 29, 2020

Conversation

chimp1984
Copy link
Contributor

Change handling of delay at republishing

The delay was too long. Some users have 100 - 200
offers and with the 700 ms delay it takes 70-140 sec.
This causes more stress for the network and UI due
permanent adding of offers. We decreased delay to 30 ms per offer.
So with 200 offers it would be about 6 sec. Maybe we could reduce
it even further but as it is hard to test in the live network with
so many offers it is better to not be too radical with the change.

Remove debug and trace logs
Add curly brackets
The delay was too long. Some users have 100 - 200
offers and with the 700 ms delay it takes 70-140 sec.
This causes more stress for the network and UI due
permanent adding of offers. We decreased delay to 30 ms per offer.
So with 200 offers it would be about 6 sec. Maybe we could reduce
it even further but as it is hard to test in the live network with
so many offers it is better to not be too radical with the change.
Invert the if branch so the normal case is first
Add comment
@chimp1984 chimp1984 changed the title Improve offer publishing [WIP] Improve offer publishing Dec 16, 2020
Call flush at openOfferManager shutdown.
Remove unused method.

Force broadcaster to send out immediately, otherwise we could
have a 2 sec delay until the bundled messages sent out.
This version is intended to be deployed to a power user to actually
try it out live as testing it with real conditions is very difficult.
@ripcurlx
Copy link
Contributor

Travis is failing because of broken Tests.

@chimp1984 chimp1984 changed the title [WIP] Improve offer publishing Improve offer publishing Dec 16, 2020
@chimp1984 chimp1984 requested a review from sqrrm December 16, 2020 15:57
@ripcurlx
Copy link
Contributor

@sqrrm Could you please review the changes so it can be added to the release branch asap?

Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

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

utACK

Best wait to merge to master until it's been tested

The periodicRefreshOffersTimer gets started at offer publishing.
Before the stopPeriodicRefreshOffersTimer got overwritten by the start in offer
publishing so it did not had any effect beside that we restarted it. Now we
process offer publishing without delay and a stop after the call would stop
the refresh timer.
Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

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

utACK

Good find

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