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

John Wagenleitner commented on GROOVY-8092:
-------------------------------------------

{quote}But changing the SoftReference to a WeakReference may solve the problem 
for you, it will produce a new problem for us. ....{quote}

Especially in terms of how the metaclass is referenced, I think this would lead 
to them being constantly recreated and they are expensive to initialize.

{quote}And replacing the SoftReference with a hard one will actually increase 
the problem.. can still make sense in certain, very specific cases, as John was 
explaining.{quote}

I think many of the classes that {{ClassInfo}} references are from the same 
classloader as {{ClassInfo.class}} or the bootstrap loader, so think these can 
be safely kept via strong reference without causing further leaks.  Reducing 
the number of WeakReferences would be desirable because of the overhead they 
have on GC.  This does not address the soft reference problem with the 
metaclass/class.  But think if the metaclass referenced the class in the same 
manner as the {{ClassInfo}} (strong for same or higher classloader or weak 
otherwise) it might address the issue.  I hope to get more time soon to look at 
some of the metaclass changes that are being introduced on master, so far it 
looks very promising.

> Compatibility issues between groovy 2.4.8 and jenkins workflow-cps-plugin  
> 2.23
> -------------------------------------------------------------------------------
>
>                 Key: GROOVY-8092
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8092
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-runtime
>    Affects Versions: 2.4.8
>         Environment: Jenkins 2.19-stable with a single commit that bumps 
> groovy 2.4.8
> workflow-cps-plugin 2.23
>            Reporter: Ion Alberdi
>
> Created the issue on jenkins first
> https://issues.jenkins-ci.org/browse/JENKINS-42189
> Creating it here, in case the fix may be developed in groovy itself.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to