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

improve Cas FS to JCas cover instance map

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.5.0SDK
    • 2.6.0SDK
    • Core Java Framework
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: