Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-3842

Node restart performance degrades as more restarts are performed.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Java-SCA-2.0
    • None
    • SCA Java Runtime
    • None
    • WinXP Sun JDK 1.6.0-20

    Description

      Ant has a Node unit test (http://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/PerflTest.java) which starts and stops a node repeatedly. If you watch what happens with increasing numbers of repetitions you'll see that the runtime slows and uses more memory.

      On initial inspection the DefaultImport is being added into each contribution on each restart in DeployerImpl.build hence the increasing memory usage. This raises the question though of why the code is doing all this work and each restart in the first place. Looking at the code in NodeImpl.start() there is a check that ensures that the contributions are only loaded once. But then it goes on to recreate the composite for the node. This will always be the same as the contributions are only loaded once.

      It looks like we can change the code in start() to only create domainComposite and compositeContext when the contributions are loaded. stop() will need changing so that these are not reset.

      Attachments

        Activity

          People

            simonslaws Simon Laws
            simonslaws Simon Laws
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: