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

Optimize sleeping behavior in CSigSharesManager::WorkThreadMain #2707

Merged
merged 3 commits into from
Feb 16, 2019

Conversation

codablock
Copy link

@codablock codablock commented Feb 15, 2019

See individual commits. This PR currently also includes #2704 as it otherwise wouldn't compile. I'll remove that PR when it is merged.

Profiling has shown that CSigSharesManager::WorkThreadMain is idling a lot even though there is a lot of pending work. This PR fixes this.

src/llmq/quorums_signing_shares.cpp Outdated Show resolved Hide resolved
src/llmq/quorums_signing_shares.cpp Outdated Show resolved Hide resolved
@UdjinM6 UdjinM6 added this to the 14.0 milestone Feb 15, 2019
@UdjinM6
Copy link

UdjinM6 commented Feb 15, 2019

LGTM, will re-review after rebase

When the current iteration resulted in CPU intensive work, it's likely that
the next iteration will result in work as well. Do not sleep in that case,
as we're otherwise wasting (unused) CPU resources.
@codablock
Copy link
Author

Rebased and force-pushed

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK

@UdjinM6 UdjinM6 merged commit 7a192e2 into dashpay:develop Feb 16, 2019
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.

None yet

2 participants