Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-3557

Remove synchronization of isModified method in ExpandoMetaClass to improve performance

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.6, 1.6.1, 1.5.8, 1.6.2, 1.6.3
    • 1.9-beta-4, 1.8.4
    • None
    • None
    • 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?

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            marksmithson Mark Smithson
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: