On 2011/02/14 09:37, Stuart Henderson wrote:
> As mentioned in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578019
> browsers using ports/www/webkit make a dns request for . each
> time the mouse position changes.
> 
> Chrome doesn't have this problem (it doesn't seem to have
> this code in its internal copy of webkit).
> 
> I tracked down a patch in https://bugs.webkit.org/show_bug.cgi?id=38263
> which fixes this. It seems a bit of a hack (why is it bothering to
> look these up internally anyway?) but it's way better than what we
> have now.
> 
> With the port diff below, I can now start xxxterm or midori, open a
> page, and move the mouse over the window, without sending hundreds or
> thousands of junk requests to the nameserver.
> 
> If you're using this on a metered or slow internet connection it's
> quite an improvement...

This is still a problem with the new version of webkit; updated diff
below.

Index: Makefile
===================================================================
RCS file: /cvs/ports/www/webkit/Makefile,v
retrieving revision 1.42
diff -u -p -r1.42 Makefile
--- Makefile    3 Mar 2011 13:44:10 -0000       1.42
+++ Makefile    6 Mar 2011 10:51:55 -0000
@@ -4,6 +4,7 @@ COMMENT =       open source web browser engine
 
 DISTNAME =     webkit-1.2.7
 EPOCH =                0
+REVISION =     0
 CATEGORIES =   www
 
 HOMEPAGE =     http://webkitgtk.org/
Index: patches/patch-WebCore_platform_network_soup_DNSSoup_cpp
===================================================================
RCS file: patches/patch-WebCore_platform_network_soup_DNSSoup_cpp
diff -N patches/patch-WebCore_platform_network_soup_DNSSoup_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-WebCore_platform_network_soup_DNSSoup_cpp     6 Mar 2011 
10:51:55 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- WebCore/platform/network/soup/DNSSoup.cpp.orig     Sat Mar  5 20:50:25 2011
++++ WebCore/platform/network/soup/DNSSoup.cpp  Sat Mar  5 20:51:40 2011
+@@ -36,6 +36,8 @@ namespace WebCore {
+ void prefetchDNS(const String& hostname)
+ {
+ #ifdef HAVE_LIBSOUP_2_29_90
++    if (hostname.isEmpty())
++        return;
+     String uri = "http://"+hostname;
+     GOwnPtr<SoupURI> soupURI(soup_uri_new(uri.utf8().data()));
+     // We may get invalid hostnames, so NULL-check here.

Reply via email to