Groovy
  1. Groovy
  2. GROOVY-3557

Remove synchronization of isModified method in ExpandoMetaClass to improve performance

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.6, 1.6.1, 1.5.8, 1.6.2, 1.6.3
    • Fix Version/s: 1.9-beta-4, 1.8.4
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux, Java 1.6, Tomcat

      Description

      Sscalability seems to suffer as a result of TagLibs being implemented as singletons and locking occurring on ExpandoMetaClass.isModified() when the server is processing multiple requests concurrently.

      Performance is fine when there is a small number of concurrent requests, but as the number of concurrent requests increases response times increase dramatically.

      Locking was noticed by profiling a running application using Your Kit Java Profiler and JMeter to simulate load.

      More details are available here:
      http://digitalmorphosis.blogspot.com/2009/05/grails-scalability.html

      Obvious fix would be to create new instances of taglibs for each request/thread, but not sure what side effects this would have?

        Activity

        Mark Smithson created issue -
        Graeme Rocher made changes -
        Field Original Value New Value
        Fix Version/s 1.1.2 [ 15289 ]
        Lari Hotari made changes -
        Attachment 0001-request-scope-for-TagLib-beans-GRAILS-4594.patch [ 42234 ]
        Graeme Rocher made changes -
        Fix Version/s 1.1.2 [ 15289 ]
        Affects Version/s 1.6.2 [ 15151 ]
        Key GRAILS-4594 GROOVY-3557
        Affects Version/s 1.6.1 [ 14852 ]
        Affects Version/s 1.5.8 [ 14630 ]
        Fix Version/s 1.7-beta-1 [ 14014 ]
        Affects Version/s 1.6.3 [ 15251 ]
        Affects Version/s 1.1 [ 15043 ]
        Affects Version/s 1.6 [ 14981 ]
        Project Grails [ 11063 ] groovy [ 10242 ]
        Fix Version/s 1.6.4 [ 15291 ]
        Component/s TagLib [ 12106 ]
        Graeme Rocher made changes -
        Summary Thread Locking under in grails tag libs Remove synchronization of isModified method in ExpandoMetaClass to improve performance
        Jochen Theodorou made changes -
        Priority Critical [ 2 ] Major [ 3 ]
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Assignee Graeme Rocher [ graemerocher ] Jochen Theodorou [ blackdrag ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.6.x [ 15537 ]
        Fix Version/s 1.6.4 [ 15291 ]
        Jochen Theodorou made changes -
        Fix Version/s 1.7-beta-1 [ 14014 ]
        Fix Version/s 1.7-beta-x [ 15538 ]
        Jochen Theodorou made changes -
        Fix Version/s 1.7-beta-2 [ 15540 ]
        Fix Version/s 1.6.x [ 15537 ]
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 1.6.5 [ 15539 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 1.7-beta-x [ 15538 ]
        Graeme Rocher made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Graeme Rocher made changes -
        Fix Version/s 1.7-beta-2 [ 15540 ]
        Fix Version/s 1.6.5 [ 15539 ]
        Fix Version/s 1.6.6 [ 15781 ]
        Graeme Rocher made changes -
        Priority Major [ 3 ] Blocker [ 1 ]
        Jochen Theodorou made changes -
        Resolution Fixed [ 1 ]
        Status Reopened [ 4 ] Closed [ 6 ]
        Graeme Rocher made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Graeme Rocher made changes -
        Fix Version/s 1.6.6 [ 15781 ]
        Fix Version/s 1.6.7 [ 16012 ]
        Jochen Theodorou made changes -
        Resolution Fixed [ 1 ]
        Status Reopened [ 4 ] Closed [ 6 ]
        Graeme Rocher made changes -
        Status Closed [ 6 ] Reopened [ 4 ]
        Resolution Fixed [ 1 ]
        Graeme Rocher made changes -
        Fix Version/s 1.6.7 [ 16012 ]
        Fix Version/s 1.8.1 [ 17223 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.8.2 [ 17495 ]
        Fix Version/s 1.8.1 [ 17223 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.8.2 [ 17495 ]
        Fix Version/s 1.8.3 [ 17657 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.8.3 [ 17657 ]
        Status Reopened [ 4 ] Closed [ 6 ]
        Fix Version/s 1.9-beta-4 [ 17656 ]
        Fix Version/s 1.8.4 [ 17852 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12732529 ] Default workflow, editable Closed status [ 12744391 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12970349 ] Default workflow, editable Closed status [ 12978150 ]

          People

          • Assignee:
            Jochen Theodorou
            Reporter:
            Mark Smithson
          • Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development