Bug 131531

Summary: Unnecessary authentication cache lookup
Product: [Unmaintained] kio Reporter: Anders Bergstr <andberg75>
Component: httpAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED INTENTIONAL    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Patch

Description Anders Bergstr 2006-07-29 23:47:25 UTC
Version:            (using KDE KDE 3.5.3)
Installed from:    Debian testing/unstable Packages
OS:                Linux

The http-ioslave makes a authentication cache-lookup for every url it tries to fetch. Most pages doesn't use any authentication hence it is totally waste of time and when you have a page with 100s of objects(images) it will do a lookup for each and every one. This makes kded take 20-40% of my CPU (400MHz) while loading a single page(This goes to 0%  with the patch). The time is spent i kpasswdserver and if I remember correctly most of that time was in the kwallet-backend which probably could be faster.
Comment 1 Anders Bergstr 2006-07-29 23:52:28 UTC
Created attachment 17161 [details]
Patch

A patch to fix the problem. 
I don't know the http code very well so it might not be correct but since it
such a serious performance bug I think it should be fixed somehow.
Comment 2 Waldo Bastian 2006-08-08 03:06:17 UTC
Doesn't this patch create an extra round-trip to the remote server for every object on pages that _do_ require authentication?
Comment 3 Anders Bergstr 2006-08-20 12:56:19 UTC
Probably. I will try to make a better one in a couple of weeks.
Comment 4 Dawit Alemayehu 2007-09-01 21:31:48 UTC
Authentication pre-lookup is necessary to combat unnecessary round-trip to a remote server when authentication is required and is allowed per RFC 2616. The only way around this is to make this optional for those that don't mind the round trip.