Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 313597

Summary: Unnecessary work getting proxies for local file uris
Product: [Eclipse Project] Platform Reporter: Andrew Niefer <aniefer>
Component: TeamAssignee: Platform Team Inbox <platform-team-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: irbull, jamesblackburn+eclipse, pascal, pawel.pogorzelski1
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Andrew Niefer CLA 2010-05-19 14:27:48 EDT
If ProxySetupHelper#getProxy(String) is called with a local file uri
like "file:/eclipse/I20100511-0800/plugins/org.eclipse.osgi_3.6.0.v20100512.jar"

Then we end up calling ProxyManager#getProxyDataForHost with host=null and type="file".  If system proxies are enabled, there is a relatively expensive call to the native proxy provider with a URI of "file://null"

(The UnixProxyProvider does a runtime exec of "/bin/sh -c env | grep -i proxy")

If the host is null, can't we just shortcut all of this and return no proxy?

See http://pastebin.com/UUy3QBtQ for an example call stack, this becomes noticeable as a performance hit when performing p2 operations on local repositories.
Comment 1 James Blackburn CLA 2011-01-11 12:22:56 EST
Fixed in 3.7M5

*** This bug has been marked as a duplicate of bug 332728 ***