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

Reduce unneeded fixed flow controller sync contention

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.6.0SDK
    • 2.7.0SDK
    • Core Java Framework
    • None

    Description

      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.

      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: