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

make pingpong's sendf() use dynbuf #6004

Closed
wants to merge 2 commits into from
Closed

Conversation

bagder
Copy link
Member

@bagder bagder commented Sep 23, 2020

By having Curl_pp_vsendf use a dynbuf for the send buffer, we avoid frequent malloc/realloc/free series. Test case 100 (FTP dir list PASV) does 7 fewer memory allocation calls after this in my test setup (132 => 125), curl 7.72.0 needed 140 calls for this.

Test case 103 makes 9 less now (130). Down from 149 in 7.72.0.

This PR adds Curl_dyn_vaddf to the dynbuf API to make this possible.

... reuses the same dynamic buffer instead of doing repeated malloc/free
cycles.
@bagder bagder closed this in f74afa4 Sep 23, 2020
bagder added a commit that referenced this pull request Sep 23, 2020
... reuses the same dynamic buffer instead of doing repeated malloc/free
cycles.

Test case 100 (FTP dir list PASV) does 7 fewer memory allocation calls
after this change in my test setup (132 => 125), curl 7.72.0 needed 140
calls for this.

Test case 103 makes 9 less allocations now (130). Down from 149 in
7.72.0.

Closes #6004
@bagder bagder deleted the bagder/pingpong-dynbuf branch September 23, 2020 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

1 participant