Skip to content

Commit 2adbc17

Browse files
authored
impl(rest): make the CurlImpl spill buffer circular (#10474)
Eliminate "shift down" logic in the spill buffer and WriteVector. While this probably doesn't make a measurable difference ... ``` //google/cloud:internal_curl_rest_client_integration_test old over 100 runs: max = 5.0s, min = 2.6s, avg = 4.6s, dev = 0.3s new over 100 runs: max = 5.0s, min = 2.3s, avg = 4.6s, dev = 0.4s ``` ..., removing redundant copying is always a good thing. Fixes #7958. Move the spill buffer code into its own class so that it might be tested individually. Initialize `download_stall_minimum_rate_` (from its option) instead of overwriting `transfer_stall_minimum_rate_`. Do not store an entire `Options` object when we only need the value of the `CurlFollowLocationOption`. Close #8059 by commenting on how the libcurl API does not support data buffers owned by the caller. This means there will always be additional copying of the request/response data into/from libcurl. Close #9200 by removing the TODO for an already-answered question. Close #7957 by removing the TODO for an already-answered question. Group the `extern "C"` libcurl callbacks, and make them static within the cc file. Also immediately convert the libcurl ptr/size pairs to `absl::Span<char>`. Cleanup some comments that seem to refer to older versions of the code, and add some missing includes. Rename some variables, like `buffer` and `ptr`, to give a clearer indiction of their roles. Remove the trailing newlines from all `GCP_LOG()`ing.
1 parent d35d72f commit 2adbc17

File tree

3 files changed

+426
-433
lines changed

3 files changed

+426
-433
lines changed

0 commit comments

Comments
 (0)