hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1538) Monitor contention at org.apache.http.impl.client.CloseableHttpResponseProxy.newProxy(HttpResponse original)
Date Mon, 11 Aug 2014 14:49:14 GMT

    [ 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message