[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14092837#comment-14092837
 ] 

Sebb commented on HTTPCLIENT-1538:
----------------------------------

Does not appear to be necessary here, but probably worth considering using the 
IODH idiom [1] in future for a static initialisation.

I doubt it would here here because it looks like the class will only be loaded 
if newProxy() is invoked, so the Proxy constructor field will always be needed.

[1] http://en.wikipedia.org/wiki/Initialization-on-demand_holder_idiom

> Monitor contention at 
> org.apache.http.impl.client.CloseableHttpResponseProxy.newProxy(HttpResponse 
> original)
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1538
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1538
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>    Affects Versions: 4.3.5, 4.4 Alpha1
>            Reporter: Lucas Pouzac
>            Priority: Minor
>              Labels: concurrency, performance
>             Fix For: 4.3.6, 4.4 Alpha2
>
>         Attachments: monitor_contention_closeablehttpresponseproxy.png
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> CloseableHttpResponseProxy.newProxy() indirectly calls 
> java.lang.reflect.Proxy.getProxyClass0(), which calls into JRE lib method 
> causing monitor contention. See screen shot
> I create a Pull Request [#15|https://github.com/apache/httpclient/pull/15]



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to