You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Nathan Beyer (JIRA)" <ji...@apache.org> on 2008/03/23 22:17:24 UTC

[jira] Commented: (HARMONY-5636) [classlib][luni][performance] java.lang.reflect.Proxy cache should be unsynchronized

    [ https://issues.apache.org/jira/browse/HARMONY-5636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581428#action_12581428 ] 

Nathan Beyer commented on HARMONY-5636:
---------------------------------------

This patch isn't safe. If applied, it would expose the possibility of the 'containsKey' being invoked while a 'put' is being invoked and there's no guarantee that the internal state of the Map would be safe for execution (spurious NPEs, etc).

The patch also removes the WeakHashMap, but that's not mentioned at all.

Additionally, the synchronized blocks in this bit of code are already very small, so I'm skeptical of real value of such a change. 

> [classlib][luni][performance] java.lang.reflect.Proxy cache should be unsynchronized
> ------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5636
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5636
>             Project: Harmony
>          Issue Type: Improvement
>            Reporter: Aleksey Shipilev
>            Priority: Minor
>         Attachments: 0004-serial-isProxyClass.patch
>
>
> For now, the proxyCache in Proxy is synchronized, which lead to performance problems with accessing Proxy.isProxyClass() from multiple threads at once.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.