perf(p2p): Only update send monitor once per batch packet msg send by ValarDragon · Pull Request #3382 · cometbft/cometbft · GitHub
More Web Proxy on the site http://driver.im/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Small optimization to outbound packet gossip, I expect this to be a 1-2% speedup to outbound packet gossip as is right now. Will test on mainnet soon
This is safe as outbound packet gossip is single threaded per peer as is right now. Technically makes the send monitor marginally less real time, but this is irrelevant as the send monitor works on 20ms sliding windows anyway
PR checklist
Tests written/updated
Changelog entry added in .changelog (we use unclog to manage our changelog)
Updated relevant documentation (docs/ or spec/) and code comments
ValarDragon
changed the title
Only update send monitor once per batch packet msg send
perf(p2p): Only update send monitor once per batch packet msg send
Jul 1, 2024
The reason will be displayed to describe this comment to others. Learn more.
Good. By I wondering if we are preserving the same behavior as before, in particular in terms of the error handling.
In short, if we return at line 533 we are not updating the monitor at all, even with the bytes sent in previously and successful calls. The same is valid for line 529, isn't it?
The solution I suggest is to update the sendMonitor as part of a defer clause, it is done in any case.
…3382)
Small optimization to outbound packet gossip, I expect this to be a 1-2%
speedup to outbound packet gossip as is right now. Will test on mainnet
soon
This is safe as outbound packet gossip is single threaded per peer as is
right now. Technically makes the send monitor marginally less real time,
but this is irrelevant as the send monitor works on 20ms sliding windows
anyway
---
#### PR checklist
- [ ] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
---------
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: Daniel <daniel.cason@informal.systems>
(cherry picked from commit 20d8630)
# Conflicts:
# .changelog/v0.38.8/improvements/3382-single-send-monitor-per-packet.md
…ometbft#3382)
Small optimization to outbound packet gossip, I expect this to be a 1-2%
speedup to outbound packet gossip as is right now. Will test on mainnet
soon
This is safe as outbound packet gossip is single threaded per peer as is
right now. Technically makes the send monitor marginally less real time,
but this is irrelevant as the send monitor works on 20ms sliding windows
anyway
---
- [ ] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
---------
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: Daniel <daniel.cason@informal.systems>
(cherry picked from commit 20d8630)
itsdevbear
pushed a commit
to berachain/cometbft
that referenced
this pull request
Jul 4, 2024
…ometbft#3382)
Small optimization to outbound packet gossip, I expect this to be a 1-2%
speedup to outbound packet gossip as is right now. Will test on mainnet
soon
This is safe as outbound packet gossip is single threaded per peer as is
right now. Technically makes the send monitor marginally less real time,
but this is irrelevant as the send monitor works on 20ms sliding windows
anyway
---
- [ ] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
---------
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: Daniel <daniel.cason@informal.systems>
(cherry picked from commit 20d8630)
…ackport #3382) (#3417)
Small optimization to outbound packet gossip, I expect this to be a 1-2%
speedup to outbound packet gossip as is right now. Will test on mainnet
soon
This is safe as outbound packet gossip is single threaded per peer as is
right now. Technically makes the send monitor marginally less real time,
but this is irrelevant as the send monitor works on 20ms sliding windows
anyway
---
#### PR checklist
- [ ] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
<hr>This is an automatic backport of pull request #3382 done by
[Mergify](https://mergify.com).
Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
…3382)
Small optimization to outbound packet gossip, I expect this to be a 1-2%
speedup to outbound packet gossip as is right now. Will test on mainnet
soon
This is safe as outbound packet gossip is single threaded per peer as is
right now. Technically makes the send monitor marginally less real time,
but this is irrelevant as the send monitor works on 20ms sliding windows
anyway
---
#### PR checklist
- [ ] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
---------
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: Daniel <daniel.cason@info
9E81
rmal.systems>
(cherry picked from commit 20d8630)
…ackport #3382) (#3487)
Small optimization to outbound packet gossip, I expect this to be a 1-2%
speedup to outbound packet gossip as is right now. Will test on mainnet
soon
This is safe as outbound packet gossip is single threaded per peer as is
right now. Technically makes the send monitor marginally less real time,
but this is irrelevant as the send monitor works on 20ms sliding windows
anyway
---
#### PR checklist
- [ ] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
<hr>This is an automatic backport of pull request #3382 done by
[Mergify](https://mergify.com).
Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small optimization to outbound packet gossip, I expect this to be a 1-2% speedup to outbound packet gossip as is right now. Will test on mainnet soon
This is safe as outbound packet gossip is single threaded per peer as is right now. Technically makes the send monitor marginally less real time, but this is irrelevant as the send monitor works on 20ms sliding windows anyway
PR checklist
.changelog
(we use unclog to manage our changelog)docs/
orspec/
) and code comments