Robert Iakobashvili re-arranged the internal hash code to work with a custom
hash function for different hashes, and also expanded the default size for the socket hash table used in multi handles to greatly enhance speed when very many connections are added and the socket API is used.
This commit is contained in:
@@ -131,7 +131,8 @@ static void freednsentry(void *freethis);
|
||||
void Curl_global_host_cache_init(void)
|
||||
{
|
||||
if (!host_cache_initialized) {
|
||||
Curl_hash_init(&hostname_cache, 7, freednsentry);
|
||||
Curl_hash_init(&hostname_cache, 7, Curl_hash_str, Curl_str_key_compare,
|
||||
freednsentry);
|
||||
host_cache_initialized = 1;
|
||||
}
|
||||
}
|
||||
@@ -537,7 +538,7 @@ static void freednsentry(void *freethis)
|
||||
*/
|
||||
struct curl_hash *Curl_mk_dnscache(void)
|
||||
{
|
||||
return Curl_hash_alloc(7, freednsentry);
|
||||
return Curl_hash_alloc(7, Curl_hash_str, Curl_str_key_compare, freednsentry);
|
||||
}
|
||||
|
||||
#ifdef CURLRES_ADDRINFO_COPY
|
||||
|
Reference in New Issue
Block a user