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

FSIndexComparatorImpl.equalsWithoutType() gets slow for many CASes with the same TS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1.0SDK
    • 3.1.1SDK
    • UIMA
    • None

    Description

      When creating several hundred CASes with the same type system, the `shareExisting` mechanism which is designed to save on memory starts eating into CPU time quite a lot.

      This screenshot shows that in my particular case, the method is called ~11mio times and takes the bulk of the processing time. The call hierarchy is a bit messed up though - actually this happens when the CASes are initialized.

      The second screenshot shows the actual call hierarchy, but for some reason, the profile doesn't properly dive into the `equals` method here and doesn't count the time spent in `equalsWithoutType`.

      !

      So either the method shouldn't be called that often - or - it should be way faster.

      In the example, I have like 1800 CAS instances and their type system has upwards of 200 types.

      Attachments

        1. Uima6136Test.java
          1 kB
          Richard Eckart de Castilho
        2. 2019-10-21_22-23-37.png
          667 kB
          Richard Eckart de Castilho
        3. 2019-10-21_22-44-25.png
          762 kB
          Richard Eckart de Castilho

        Issue Links

          Activity

            People

              schor Marshall Schor
              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 - 20m
                  20m