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

Constructing aggregate engines is slow

    XMLWordPrintableJSON

Details

    Description

      Creating an aggregate engine is slow because every time a default fixed flow descriptor is loaded from the classpath as XML and parsed.

      FixedFlowController

        public static FlowControllerDescription getDescription() {
          URL descUrl = FixedFlowController.class
                  .getResource("/org/apache/uima/flow/FixedFlowController.xml");
          FlowControllerDescription desc;
          try {
            desc = (FlowControllerDescription) UIMAFramework.getXMLParser().parse(
                    new XMLInputSource(descUrl));
          } catch (InvalidXMLException e) {
            throw new UIMARuntimeException(e);
          } catch (IOException e) {
            throw new UIMARuntimeException(e);
          }
          return desc;
        }
      

      IMHO, this should be loaded once and then cached permanently - or be constructed completely programmatically (also once!) and never loaded at all.

      Attachments

        1. Screenshot 2020-03-15 at 18.52.48.png
          352 kB
          Richard Eckart de Castilho

        Issue Links

          Activity

            People

              rec Richard Eckart de Castilho
              rec Richard Eckart de Castilho
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m