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

Constructing aggregate engines is slow

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          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

                Slack

                  Issue deployment