multi: use larger dns hash table for multi interface

Have curl_multi_init() use a much larger DNS hash table than used for
the easy interface to scale and perform better when used with _many_
host names.

curl_share_init() sets an in-between size.

Inspired-by: Ivan Tsybulin
See #9340
Closes #9376
This commit is contained in:
Daniel Stenberg 2022-08-27 14:48:13 +02:00
parent c5c6e86783
commit 7632c0d25a
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 18 additions and 11 deletions

View file

@ -132,7 +132,7 @@ void Curl_resolv_unlock(struct Curl_easy *data,
struct Curl_dns_entry *dns);
/* init a new dns cache */
void Curl_init_dnscache(struct Curl_hash *hash);
void Curl_init_dnscache(struct Curl_hash *hash, int hashsize);
/* prune old entries from the DNS cache */
void Curl_hostcache_prune(struct Curl_easy *data);