Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-8962

CloneUtils deepCloneObject Performance Improvement

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Won't Fix
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Component/s: Performance
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Rice Module:
      KRAD
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      CloneUtils' deepCloneObject method is performing a getAnnotation reflection call to acquire annotations of type: ReferenceCopy.

      This call is being executed against every field in the process of deep cloning, and there are 3 fields in the application which actually have this annotation. With sufficient load, you'll hit another synchronize block in the nested declaredAnnotations() method in java.lang.reflect.Field. This will cause threads to be blocked and performance will degrade substantially. I hit this bottleneck around 45 to 60 concurrent threads doing lookups.

      This also accounts for a good portion of cpu time which can be avoided by caching which fields have the annotation.

        Attachments

          Activity

          Hide
          jdomeyer Jeff Domeyer (Inactive) added a comment -

          Attaching current refactoring of cloneutils that I have

          Show
          jdomeyer Jeff Domeyer (Inactive) added a comment - Attaching current refactoring of cloneutils that I have
          Hide
          jkneal Jerry Neal (Inactive) added a comment -

          Removing the use of CloneUtils so this is not longer relevant

          Show
          jkneal Jerry Neal (Inactive) added a comment - Removing the use of CloneUtils so this is not longer relevant

            People

            • Assignee:
              Unassigned
              Reporter:
              jdomeyer Jeff Domeyer (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: