Revision 1215543

Go back to digest for 23rd January 2011

Bug Fixes in KDE Base

Maks Orlovich committed changes in /trunk/KDE/kdelibs/kio:

This fixes severe performance problems with complicated proxy scripts.

1) Whenever we get a string that may be either a hostname or IP, try
checking it for being an IP with QHostAddress first, rather than handing it to
QHostInfo::fromName directly, as that method does reverse lookups on IPs.
Takes proxy overhead on a certain complex but well-written script from
0.5 seconds (per-request, yikes) to about 50ms or so.

2) Use the KIO DNS cache when possible in cases we have a hostname, as there
is obviously quite a bit of locality in hostnames used. This takes the
overhead down to the 2-5ms range.

Reviewed by Thiago.

File Changes

Modified 2 files
  • /trunk/KDE/kdelibs/kio
  •   /kio/hostinfo_p.h
  •   /misc/kpac/script.cpp
2 files changed in total