[Dnsmasq-discuss] Dnsmasq with Gigantic hosts file

Jan Seiffert kaffeemonster at googlemail.com
Wed Jan 11 18:15:50 GMT 2012


2012/1/11 Simon Kelley <simon at thekelleys.org.uk>:
[snip]
> To implement this, as each line is read in a host file, the address is
> looked up in the cache to determine if it's been seen before. As the cache
> is NOT hashed for by-address lookups, this is an O(n) operation, and reading
> a hostfile is O(n^2) worst-case.
>

Ouch!

[snip]
> Try commenting out the code around line 650 in cache.c which starts with a
> big comment block explaining the tweak I mention above, starting
>
> /* Ensure there is only one address -> name mapping (first one trumps)
>
> If goes fast then I've guessed right. Assuming I have, there are various
> solutions: add hashing for by-adddress cache lookups,

Should i refresh my reverse tree code?
Nice thing was it was so unintrusive, so small device could disable it,

Preston, which version are you running, or can you run the latest version?

>
> We can argue about that once we know it's the correct issue.
>

Sure

>
>
> HTH
>
> Simon.
>

Greetings
Jan

-- 
Remember to eat a healthy breakfast, for tonight we dine in hell!



More information about the Dnsmasq-discuss mailing list