[Bug 377927] New: Konqueror 4 does not cache/remember DNS queries
https://bugzilla.novell.com/show_bug.cgi?id=377927 Summary: Konqueror 4 does not cache/remember DNS queries Product: openSUSE 11.0 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: KDE4 Applications AssignedTo: kde-maintainers@suse.de ReportedBy: robin.knapp@fujitsu-siemens.com QAContact: qa@suse.de Found By: --- I always wondered why konqi4 is so slow compared to other browsers. The problem is that it sends DNS queries for *every* access without caching/remembering the result. For example while loading www.spiegel.de I counted 133 DNS lookups for "www.spiegel.de". With a latency of 50ms (which is normal for a DSL line) this would delay page loading for about 6-7 seconds, which is really bad. It gets worse with more images, for example www.bild.de loads >250 images if I remember correctly. And if you have an ipv6 address, this will double to over 500 lookups - or 25 seconds because it also lookups up for AAAA records. I just did some further tests, dumps etc. and found out that konqueror4 does not use gethostbyname, but getaddrinfo calls for name resolution. Those won't get cached by nscd, so it doesn't help. I don't think that installing/configuring a local caching dns server (as proposed in some upstream bugs) is a valid solution for my grandpa ;) Without a local dns, konqueror is unusable for many web pages. Maybe this should even be fixed in nscd by caching getaddrinfo calls (I don't know much about this and why it isn't cached by now, maybe there's a reason for doing so); if that's not possible, konqueror/kio_http should implement their own caching. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=377927
User robin.knapp@fujitsu-siemens.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=377927#c1
--- Comment #1 from Robin Knapp
nscd won't cache anything if I run this code: struct addrinfo hint = {0}; hint.ai_family = PF_INET; getaddrinfo(argv[1], NULL, &hint, &result);
But it works fine if I remove "hint.ai_family = PF_INET". KDE always sets ai_family, though.
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=377927
User dmueller@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=377927#c2
Dirk Mueller
https://bugzilla.novell.com/show_bug.cgi?id=377927
User robin.knapp@fujitsu-siemens.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=377927#c3
--- Comment #3 from Robin Knapp
https://bugzilla.novell.com/show_bug.cgi?id=377927
User pbaudis@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=377927#c4
Petr Baudis
https://bugzilla.novell.com/show_bug.cgi?id=377927
User robin.knapp@fujitsu-siemens.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=377927#c5
--- Comment #5 from Robin Knapp
https://bugzilla.novell.com/show_bug.cgi?id=377927
User robin.knapp@fujitsu-siemens.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=377927#c6
--- Comment #6 from Robin Knapp
https://bugzilla.novell.com/show_bug.cgi?id=377927
User robin.knapp@fujitsu-siemens.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=377927#c7
--- Comment #7 from Robin Knapp
From the nscd changelog:
* Thu Nov 07 2002 - kukuk@suse.de - getaddrinfo(): get host information for AF_INET and AF_INET6 only from the same service [Bug #21237] Old bug which I cannot acces... (tried bugzilla.suse.de) -- And for the negative cache = 0: * Tue Apr 19 2005 - mls@suse.de [...] - nscd: support a negative timeout of zero, used by hosts cache -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=377927
User dmueller@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=377927#c8
--- Comment #8 from Dirk Mueller
https://bugzilla.novell.com/show_bug.cgi?id=377927
User robin.knapp@fujitsu-siemens.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=377927#c9
--- Comment #9 from Robin Knapp
https://bugzilla.novell.com/show_bug.cgi?id=377927
User robin.knapp@fujitsu-siemens.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=377927#c10
--- Comment #10 from Robin Knapp
https://bugzilla.novell.com/show_bug.cgi?id=377927
User robin.knapp@fujitsu-siemens.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=377927#c11
--- Comment #11 from Robin Knapp
However, it would be interesting to know if it's a feature or a bug why nscd doesn't cache those queries itself.
Mhh, strange. getaddrinfo now caches the getaddrinfo calls even with pf_unspec. But some konqueror4 dns queries won't be served from cache by nscd. Maybe those massive parallel dns requests confuse the resolver... don't know. However, the bug seems to be solved upstream (dns cache patch is already committed), so IMHO you may close this report as fixed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=377927
User pbaudis@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=377927#c12
Petr Baudis
participants (1)
-
bugzilla_noreply@novell.com