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:
Daniel Stenberg
2007-06-26 21:09:28 +00:00
parent 7a360de49d
commit 62f0f5571d
6 changed files with 133 additions and 50 deletions

View File

@@ -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