Skip to content

Remove assume_valid_target's Mutex wrapper to improve ckb-sync's performance #4260

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

Conversation

eval-exec
Copy link
Collaborator

@eval-exec eval-exec commented Dec 12, 2023

What problem does this PR solve?

I have discovered that there is no need to use the Mutex to protect SyncState::assume_valid_target. Therefore, this pull request changes its type from Mutex<Option<H256>> to Option<H256>.

What's Changed:

Related changes

  • change SyncState::assume_valid_target's type from Mutex<Option<H256>> to Option<H256>.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code ci-runs-only: [ quick_checks,linters ]

Side effects

  • Performance regression
  • Breaking backward compatibility

Release note

None: Exclude this PR from the release note.

@eval-exec eval-exec requested a review from a team as a code owner December 12, 2023 07:02
@eval-exec eval-exec requested review from quake and removed request for a team December 12, 2023 07:02
@eval-exec eval-exec changed the title Remove assume_valid_target's Mutex wrapper to improve performance in IBD phase Remove assume_valid_target's Mutex wrapper to improve ckb-sync's performance Dec 12, 2023
@eval-exec eval-exec marked this pull request as draft December 12, 2023 07:03
@eval-exec eval-exec added m:sync module: ckb-sync t:performance Type: Performance tuning labels Dec 12, 2023
@eval-exec eval-exec self-assigned this Dec 12, 2023
@eval-exec eval-exec closed this Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
m:sync module: ckb-sync t:performance Type: Performance tuning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant