You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (JIRA)" <ji...@apache.org> on 2017/04/03 16:33:41 UTC
[jira] [Commented] (GROOVY-7321)
MetaClassImpl.findPropertyInClassHierarchy could benefit from some caching
[ https://issues.apache.org/jira/browse/GROOVY-7321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15953751#comment-15953751 ]
Daniel Sun commented on GROOVY-7321:
------------------------------------
Jochen's PR is still open:
https://github.com/groovy/groovy-core/pull/634
> MetaClassImpl.findPropertyInClassHierarchy could benefit from some caching
> --------------------------------------------------------------------------
>
> Key: GROOVY-7321
> URL: https://issues.apache.org/jira/browse/GROOVY-7321
> Project: Groovy
> Issue Type: Bug
> Reporter: Luke Daley
>
> While profiling Gradle, this has showed up as a hotspot.
> My interpretation of the code is that it does a reflective walk, but does not cache the result. This method was being invoked 2 million times in a moderately sized Gradle build. I hacked in some naive quick caching (i.e. that retains strong references to classes) around this and it had a noticeable effect.
> I have no idea of the implications of this kind of caching though WRT things like meta class changing dynamically etc.
> Is there anything that can be done in Groovy core?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)