UIMA
  1. UIMA
  2. UIMA-1068

Use of the JCas cache should be configurable

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.3
    • Component/s: Core Java Framework
    • Labels:
      None

      Description

      The JCas caches all CAS objects that are accessed through it. This means that JCas objects that are no longer used can't be garbage collected. If only part of the processing chain uses the JCas, or the caching is redundant for some other reason, this produces a severe memory overhead.

      I ran the same experiment I ran for UIMA-1067: doubled the size of Moby Dick and ran the POS tagger from the sandbox. I used the improved version from UIMA-1067 as base case and simply commented out the line that adds JCas objects to the cache. This reduced the required heap size from 115MB to 105MB. It also improved the performance from around 10s for the base case to consistently under 9s for the version without any caching. I looked at the tagger source code, and saw that it keeps its own list of tokens around. So the savings are just the caching data structure.

      There may be cases where the JCas cache is a performance win, though I'd be curious to see the benchmarks. So we should not just turn it off, but make it configurable.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Thilo Goetz
            Reporter:
            Thilo Goetz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development