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

Tweak cleanup DFA cache of parser

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.0.0-alpha-4
    • None
    • None

    Description

      We should keep the DFA cache as long as possible for better parsing performance, but the DFA cache may be very huge and results in OOM usually if we do not handle it correctly.

      Our current solution is to set a threshold to cleanup DFA cache, but the threshold is hard for users to evaluate for a reasonable value.

      The new solution relies on GC, if the object referenced by soft reference is collected by GC, we trigger the cleanup of DFA cache. We just need set the threshold to 0 to enable the smart cleanup.

      For better compatibility, we keep the existing cleanup setting as it is.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: