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

ASF subversion and git services commented on ISIS-1137:
-------------------------------------------------------

Commit a4f924b11cf614535e2faf2fb4f7aacdb4c7e1e0 in isis's branch 
refs/heads/master from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=a4f924b ]

ISIS-1137: Now cache a ProxyFactory instance by class (allowing reuse of the 
enhanced class for all instances of that type) rather than creating a newly 
enhanced class as currently.


> PermGen errors through WrapperFactory (javassist)
> -------------------------------------------------
>
>                 Key: ISIS-1137
>                 URL: https://issues.apache.org/jira/browse/ISIS-1137
>             Project: Isis
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: core-1.8.0
>            Reporter: Dan Haywood
>            Assignee: Dan Haywood
>             Fix For: 1.9.0
>
>
> as per Oscar's report on the mailing list, see 
> http://markmail.org/message/ilow6jkg5iuxbzis
> Looking at the code, it does seem that we are leaking memory by not holding 
> the ProxyFactory class [1] (we create a new instance each time).
> The Javadoc [2] does suggest that these should be cached (it is the deafult).
> One subtlety: the ProxyFactory is per class being enhanced.  So we actually 
> need to hold a cache of these.  But at least then we will only get one extra 
> enhanced class in the permgen per type, rather than per instance (as at the 
> moment).
> ~~~
> While we are here, we should probably delete the cglib support, and do some 
> inlining of redundant interfaces.
> [1] 
> https://github.com/apache/isis/blob/dec670567ce96fa96fe89c8111c6dbca35b3ed3b/core/wrapper/src/main/java/org/apache/isis/core/wrapper/proxy/ProxyInstantiatorForJavassist.java#L62
> [2] 
> http://www.csg.ci.i.u-tokyo.ac.jp/~chiba/javassist/html/javassist/util/proxy/ProxyFactory.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to