--Boundary-00=_Fw/hKS9LojbmkT2 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit The attached patch changes KIO::AccessManager to schedule all the job requests it receives to prevent the explosion of kio_http process that can get spawned when many requests are made by an application all at once, e.g. rendering any moderately complex site. You can easily see this by using the webkitpart in Konqueror and visiting any moderately complex site. For example, before the patch visiting qt.nokia.com/developer spawns 21 kio_http processes where as only 2 are spawned with the patch. Actually the scheduler always seems to spawn only 2 processes per site. --Boundary-00=_Fw/hKS9LojbmkT2 Content-Type: text/x-patch; charset="UTF-8"; name="accessmanager.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="accessmanager.patch" Index: /home/dalemayehu/work/KDE/source/branches/kdelibs/kio/kio/accessmanager.cpp =================================================================== --- /home/dalemayehu/work/KDE/source/branches/kdelibs/kio/kio/accessmanager.cpp (revision 1011399) +++ /home/dalemayehu/work/KDE/source/branches/kdelibs/kio/kio/accessmanager.cpp (working copy) @@ -30,6 +30,7 @@ #include #include +#include namespace KIO { @@ -67,7 +68,7 @@ QNetworkReply *AccessManager::createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData) { - KIO::Job *kioJob = 0; + KIO::SimpleJob *kioJob = 0; if ( !d->externalContentAllowed && req.url().scheme() != "file" && !req.url().scheme().isEmpty() ) { kDebug() << "Blocked: " << req.url().scheme() << req.url(); @@ -109,6 +110,7 @@ return 0; } + KIO::Scheduler::scheduleJob(kioJob); KDEPrivate::AccessManagerReply *reply = new KDEPrivate::AccessManagerReply(op, req, kioJob, this); kioJob->addMetaData(d->metaDataForRequest(req)); --Boundary-00=_Fw/hKS9LojbmkT2--