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

John Wagenleitner commented on GROOVY-8199:
-------------------------------------------

Gains would be somewhat less memory (less computed values to store refs to, 
though might be mitigated by reworking the globalClassSet), less GC overhead by 
reducing the number of {{WeakReferences}} in use, and no need to do clean-up on 
the queue that holds the strong references to the computed values.

To handle all situations the same then I think the computed value and the class 
on it would need to be weakly referenced.  A strong reference would need to be 
stored for each computed value in the same loader as ClassInfo so they are not 
GC'd and this means that for computed values for classes from child loaders 
there would need to be some way to clear the strong references that are kept, 
which could be done in reference queue processing.

> Re-enable use of ClassValue for all JDKs
> ----------------------------------------
>
>                 Key: GROOVY-8199
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8199
>             Project: Groovy
>          Issue Type: Task
>    Affects Versions: 3.x, 2.5.0-alpha-1, 2.4.11
>            Reporter: Jochen Kemnade
>              Labels: patch
>         Attachments: 
> 2.4.x-0001-GROOVY-8199-GROOVY-7591-GROOVY-7683-remove-groovy.us.patch, 
> master-0001-GROOVY-8199-GROOVY-7591-GROOVY-7683-remove-groovy.us.patch
>
>
> For GROOVY-7591, the {{groovy.use.classvalue}} system property was 
> introduced. Since the underlying issue (GROOVY-7683) is fixed, the property 
> should be removed again.



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

Reply via email to