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

Reduce unneeded fixed flow controller sync contention


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


      The Fixed Flow Controller is designed to allow one instance to be used by multiple copies of a UIMA pipeline, initialized from the same context. In this case, only one initialize call is done; the others are no-ops. The instance contains one update-able ArrayList - the list of delegates. This array is normally only "read", but there are two defined interfaces to allow dynamically altering it (addAnalysisEngines, and removeAnalysisEngines). The current impl of this is a synchronized list. For the 99.99% of cases (reading), this sync is not necessary, and causes some observable sync contention.

      Change this to a non-sync'ed "CopyOnWrite" implementation, to avoid this contention. The downside is that current Flow objects in use while after this call occurs will not see the update, but new ones will. This is probably a good thing, because it seems that incorrect flows might occur if this was changed while flows were in-progress. The documentation currently says these methods are not currently called because UIMA doesn't support dynamically adding or removing analysis engines to/from an aggregate.




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


              • Created: