[ https://issues.apache.org/jira/browse/GROOVY-7977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel.Sun updated GROOVY-7977: ------------------------------- Attachment: text.html Grails supports outputing JOSN via {{render airport as JSON}}, if the code is executed concurrently in some big site, the concurrency will reduce to some extent. 在 "Daniel.Sun (JIRA)" <j...@apache.org>,2016年10月28日 上午3:47写道: [ https://issues.apache.org/jira/browse/GROOVY-7977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel.Sun updated GROOVY-7977: ------------------------------- Attachment: text.html I'm not sure how much performance can be improved, it depends on specific senario, so this is just a minor proposal. 在 "John Wagenleitner (JIRA)" <j...@apache.org>,2016年10月28日 上午1:32写道: [ https://issues.apache.org/jira/browse/GROOVY-7977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15612577#comment-15612577 ] John Wagenleitner commented on GROOVY-7977: ------------------------------------------- I didn't look in great detail, but it seems the {{LRUCache}} is used in {{Closure}} to support a some bounded (atmost/between) memoize functions. The {{ProxyGenerator}} appears to use for caching proxies for {{asType}} calls. I am not sure that putting a more high performance LRU cache would have a significant impact on general performance that would make it worth taking on a new dependency or porting over classes from a 3rd party library to include in core. As I think was suggested on the mailing list, having some basic performance numbers showing the benefit would be useful information to have. -- This message was sent by Atlassian JIRA (v6.3.4#6332) -- This message was sent by Atlassian JIRA (v6.3.4#6332) > Refine the implementation of LRUCache > ------------------------------------- > > Key: GROOVY-7977 > URL: https://issues.apache.org/jira/browse/GROOVY-7977 > Project: Groovy > Issue Type: Improvement > Affects Versions: 2.4.7 > Reporter: Daniel.Sun > Priority: Minor > Attachments: text.html, text.html, text.html > > > I found the LRUCache that Groovy is using is not efficient enough > because it is based on Collections.synchronizedMap, the LRUCache is used by > some important classes(e.g. ProxyGenerator, Closure), so it can impact the > performance somehow. > I propose to replace the implementation with > Caffeine(https://github.com/ben-manes/caffeine), which is a high performance > caching library for Java 8 and licensed under APL2. -- This message was sent by Atlassian JIRA (v6.3.4#6332)