Version: (using KDE KDE 3.5.5) Installed from: Gentoo Packages Compiler: gcc (GCC) 4.1.1 (Gentoo 4.1.1-r1) OS: Linux When I open a page with multiple images or other objects, Konqueror seems to send a DNS request for every single image - even if the domain names are all the same. (At least, that's what the output of Ethereal looks like.) If I try to go to http://gaim.sourceforge.net/planet/ , Konqueror sends too many DNS requests, and doesn't receive responses for half of them - so the page takes forever to load, and half of the images (or CSS files, etc.) don't show up. If I open the same page in Firefox, it loads very quickly, with all images present. It doesn't send the same DNS queries over and over again.
Can not reproduce.
Dima, please read following thread http://lists.kde.org/?l=kfm-devel&m=116544205906394&w=2
Ok... nscd fixed it for me.
Actually, nevermind - nscd helps, but doesn't fix everything. For some reason, it doesn't cache domain names that resolve to multiple IP addresses - like google.com. So if I use e.g. maps.google.com, Konqueror almost never loads all of the images. I tried this in Ubuntu and Gentoo. Neither one uses nscd by default, by the way. I'm kind of surprised that other people are not running into this problem. Ok, maybe it's not Konqueror's fault - but the fact is, Konqueror just fails to load lots of websites for such a silly reason.
I just wrote a simple C program that resolves host names using getaddrinfo - and all queries get cached as expected - no duplicate DNS requests. So... What does Konqueror (and the rest of KDE) do then? Does it no use getaddrinfo? Why not? I just tried this in Gentoo, Ubuntu Gutsy, and KDE4 compiled from sources - in all cases, Konqueror sends the same DNS requests over and over. If you don't have this problem, could you please tell me what distribution you use? I would *really* like to know.
Oh, same for Fedora 8. Btw, from /etc/nscd.conf on Ubuntu: # hosts caching is broken with gethostby* calls, hence is now disabled # per default. See /usr/share/doc/nscd/NEWS.Debian. KDE wouldn't be using any of those calls, would it?
I found a simple test case: #include <kresolver.h> #include <stdio.h> int main(int argc, char *argv[]) { if (argc != 2) { fprintf(stderr, "Usage: %s host\n", argv[0]); return 1; } KNetwork::KResolver qres(argv[1]); qres.setFamily(KNetwork::KResolver::InternetFamily); qres.start(); qres.wait(); return 0; } Run it with an argument like "google.com", and it will send a DNS request every time. But, if you change InternetFamily into AnyFamily, it starts using the nscd cache. For some reason, though, if you compile it using KDE4 (and replace kresolver.h with k3resolver.h), then AnyFamily will cause it to abort. This is not specific to KDE, apparently. You get the same thing by running this: struct addrinfo hint = {0}; hint.ai_family = PF_INET; int status = getaddrinfo(argv[1], NULL, &hint, &result); It doesn't use the cache. But replace PF_INET with 0, and it will. So... What does this all mean? Whose bug is this?
recent kdelibs has a DNS cache, which hopefully has resolved this issue...?
What is the current situation?
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!