Skip to content

Commit 438cbac

Browse files
Enable compression for all libCurl use (#4)
Testing shows an approximate 25% improved query throughput with this enabled. 1 million rows per minute becomes 1.25 million rows per minute, give or take a few rows.
1 parent 67fa50b commit 438cbac

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/trinoAPIWrapper/connectionConfig.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ CURL* ConnectionConfig::getCurl() {
121121
this->curl, CURLOPT_HEADERDATA, &(this->responseHeaderData));
122122
// Set a timeout on all requests
123123
curl_easy_setopt(this->curl, CURLOPT_TIMEOUT_MS, 10000);
124+
// Enable gzip and/or deflate on responses
125+
curl_easy_setopt(this->curl, CURLOPT_ACCEPT_ENCODING, "gzip, deflate");
124126
}
125127

126128
curlSetup:

0 commit comments

Comments
 (0)