Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7977

Refine the implementation of LRUCache

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4.7
    • 2.6.0-alpha-1
    • None
    • None

    Description

      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.

      Attachments

        1. text.html
          3 kB
          Daniel.Sun
        2. text.html
          4 kB
          Daniel.Sun
        3. text.html
          5 kB
          Daniel.Sun
        4. text.html
          5 kB
          Daniel.Sun
        5. text.html
          3 kB
          Daniel.Sun
        6. text.html
          4 kB
          Daniel.Sun
        7. text.html
          4 kB
          Daniel.Sun
        8. text.html
          4 kB
          Daniel.Sun

        Activity

          People

            daniel_sun Daniel Sun
            daniel_sun Daniel Sun
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: