groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Laforge <glafo...@gmail.com>
Subject Re: [PROPOSAL]Refine the implementation of LRUCache
Date Wed, 26 Oct 2016 08:48:09 GMT
We're careful not to add core dependencies usually, we only have ASM and
Antlr basically, but that'd add a new one, just for the LRU cache.
Caffeine would have to be jarjar'ed like the other core deps.

And I'm wondering if it can be trimmed down, some more...

It seems to be around 142KB:
https://mvnrepository.com/artifact/com.github.ben-manes.caffeine/caffeine/2.3.3

On Wed, Oct 26, 2016 at 10:28 AM, Cédric Champeau <cedric.champeau@gmail.com
> wrote:

> We still cannot do this on `master`, at least until 2.5 is out, because
> it's Java 7. Also things we need to consider when using external libs
> include how much the distribution would grow.
>
> 2016-10-26 8:27 GMT+02:00 孙 岚 <realbluesun@hotmail.com>:
>
>> Hi all,
>>
>>          I found the LRUCache that Groovy is using is not efficient
>> enough because it is based on Collections.synchronizeMap, 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.
>>
>>         Any thoughts?
>>
>> Cheers,
>> Daniel.Sun
>>
>>
>>
>


-- 
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform

Blog: http://glaforge.appspot.com/
Social: @glaforge <http://twitter.com/glaforge> / Google+
<https://plus.google.com/u/0/114130972232398734985/posts>

Mime
View raw message