Uploaded image for project: 'Commons OGNL (Dormant)'
  1. Commons OGNL (Dormant)
  2. OGNL-211

Performance - Replace synchronized blocks with ReentrantReadWriteLock

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.0
    • None
    • None
    • ALL

    Description

      I've noticed a lot of synchronized blocks of code in OGNL. For the most part, these synchronized blocks are controlling access to HashMaps, etc. I believe this could be done far better using ReentrantReadWriteLocks. ReentrantReadWriteLock allows unlimited concurrent access, and single threads only for writes. Perfect in an environment where the ratio of reads is far higher than writes; which is typically the scenario for caching. Plus the access control can be tuned for reads and writes; not just a big synchronized{} wrapping a bunch of code.

      Attachments

        1. Bench Results.txt
          3 kB
          Daniel Pitts
        2. Caching_Mechanism_Benchmarks.patch
          18 kB
          Daniel Pitts

        Issue Links

          Activity

            People

              maurizio.cucchiara Maurizio Cucchiara
              glively Greg Lively
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: