Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1357

Construction of EdmTypeKind very expensive

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • (Java) V4 4.6.0
    • (Java) V4 4.7.0
    • odata4-commons
    • None

    Description

      From the attached screenshot of the VisualVM sampler can be seen that construction of EdmTypeInfo instances is very expensive as EdmPrimitiveTypeKind.valueOf is used:

          try {
            primitiveType = EdmPrimitiveTypeKind.valueOf(typeName);
          } catch (final IllegalArgumentException e) {
            primitiveType = null;
          }
      

      The problem here is the exception that is thrown if the value cannot be found. Suggesting to use a static Map to cache values, PR will be provided.

      Attachments

        1. EdmTypeKind.PNG
          40 kB
          Dirk Mahler

        Issue Links

          Activity

            People

              mirbo mibo
              dirk.mahler Dirk Mahler
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 0.5h
                  0.5h