Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-10916

Dictionary Web Service method getClasses() is slow

    Details

    • Type: Service Pack Request
    • Status: Closed (View Workflow)
    • Resolution: Fixed
    • Affects Version/s: 4.1.7
    • Fix Version/s: 4.1.9
    • Component/s: Web Services API
    • Labels:
      None
    • Environment:
      Support:
      Win2008 R2 / Tomcat 6.0.35 / JDK 1.6.0_33 x64 / MySQL 5.5.36

      Description

      [ Problem ]
      Dictionary Web Service method getClasses() (https://wiki.alfresco.com/wiki/Dictionary_Web_Service#getClasses) is slower between 4.0.2 and 4.1.7

      [ Details ]
      Dictionary Web Service method getClasses() appears to be quite a bit slower in newer versions of Alfresco (>4.0.2).

      Tests run in-house for this method show that 4.1.7 is 2-3 times longer to complete getClasses than 4.0.2, timings are as follows:

      • both 4.0.2 and 4.1.7.6 instances are vanilla / Win2008 R2 / Tomcat 6.0.35 / JDK 1.6.0_33 x64 / MySQL 5.5.36
      • warm tests only

      4.0.2
      invoke getClasses 11/03/2014 01:24:22.467
      end getClasses 11/03/2014 01:24:23.718

      invoke getClasses 11/03/2014 01:25:13.150
      end getClasses 11/03/2014 01:25:14.332

      invoke getClasses 11/03/2014 01:26:01.079
      end getClasses 11/03/2014 01:26:02.255

      ~1.2s

      4.1.7
      invoke getClasses 11/03/2014 01:34:15.056
      end getClasses 11/03/2014 01:34:18.431

      invoke getClasses 11/03/2014 01:35:04.831
      end getClasses 11/03/2014 01:35:07.398

      invoke getClasses 11/03/2014 01:35:55.271
      end getClasses 11/03/2014 01:35:57.851

      ~3s

      [ Analysis ]
      I have a YK snapshot profile captured during one of these getClasses() calls which shows we could be spending our time looking up labels for the types/aspects:
      org.alfresco.repo.dictionary.M2Label.getLabel(Locale, ModelDefinition, MessageLookup, String, QName, String)
      Unfortunately I have nothing to compare this to so can only assume that getLabel() stuff is taking it's time.

      [ Steps to reproduce ]
      Install and start Alfresco
      Take the attached self-contained web-services code ('Test00149235.java') and run (make sure you have alfresco-web-service-client and alfresco-remote-api libs in the path)

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  closedbugs Closed Bugs (Inactive)
                  Reporter:
                  astrachan Alex Strachan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 5 hours
                    5h

                      Structure Helper Panel