-
Notifications
You must be signed in to change notification settings - Fork 383
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
Make a peer.SendMarshalled function #3185
Labels
Comments
ValarDragon
added
enhancement
New feature or request
needs-triage
This issue/PR has not yet been triaged by the team.
labels
Jun 4, 2024
cason
added
p2p
and removed
needs-triage
This issue/PR has not yet been triaged by the team.
labels
Jun 11, 2024
15 tasks
I assume you are mentioning the This was one of the multiple drawbacks introduced when the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Request
Summary
We spend a lot of time in peer.Send coming from broadcasting. There we have duplicated
msg.Wrap
andmsg.Marshal
methods (as we re-wrap/marshal for every peer). We should do that just once, and then send already marshalled bytes to each peer.On further refactor, we should make block parts do the same thing. We spend latency-costly time, re-marshalling blockparts in the gossip routines, whereas we could just do it once.
Problem Definition
Lowers CPU times in broadcast routines, and on later refactors gossip routines.
Proposal
Introduce a peer.SendMarshalledData function. (Or alternatively edit the Envelope struct to allow optional marshalledMsg). Then make broadcast just marshal once.
The text was updated successfully, but these errors were encountered: