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 performance when sending large messages #4119
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4119 +/- ##
==========================================
+ Coverage 82.68% 82.72% +0.03%
==========================================
Files 256 256
Lines 32508 32561 +53
==========================================
+ Hits 26880 26936 +56
+ Misses 5628 5625 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So hot, thanks for cranking on this! I'm gonna do some testing locally now but the code looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
Description
When sending and receiving large messages over the service socket we were doing suboptimal handing of the data.
Part of the solution is to avoid copying each buffer everytime a new chunk is received. The offending code was:
The new code path instead keeps track of the receive buffers in a list and only assembles the list when they are needed. The new logic is contained in a SockBuffer class.
Testing
Create a bunch of files:
Run cvp's artifact reference script pointing to this data directory.
I could not reproduce problems or a great speedup with this change on my machine. 600k files takes ~40 seconds to load. Is that good?