Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-3619

improve Cas FS to JCas cover instance map

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.0SDK
    • Fix Version/s: 2.6.0SDK
    • Component/s: Core Java Framework
    • Labels:
      None

      Description

      In highly parallel environments running on multiple cores, profiling shows that the JCas map has performance issues due to volatile and atomic operations that are unneeded, but happen due to the use of the built-in Java Random function (which uses volatile and atomic operations, internally). This map doesn't need to support multi-threading operations - it is always used in a single-thread manner. Other optimizations are possible, due to the limited way this table is used. One of the common cases is an iterator fetching an existing FS from the CAS, and needing to supply the corresponding JCas object (if it exists). This operation first looks up in the Map using the address as the key, and if not found, then makes the JCas object, and then adds it to the map - an operation which repeats the same lookup in order to find the "empty slot" where it can store the item. This extra lookup can be eliminated.

        Attachments

          Activity

            People

            • Assignee:
              schor Marshall Schor
              Reporter:
              schor Marshall Schor
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: