Tapestry 5
  1. Tapestry 5
  2. TAP5-1665

Tapestry could create non-singleton services more efficiently

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.3, 5.2
    • Fix Version/s: 5.3
    • Component/s: tapestry-ioc
    • Labels:

      Description

      For services that may be created again on each request, Tapestry does a lot of extra work to analyze the class, constructor and fields. It should be able to roll up all this information into a repeatable "plan" that can simply be re-executed on each subsequent instance creation.

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        Tapestry now generates a reusable "plan" for invoking constructors or service builder methods, and will retain that plan for scopes other than the default "singleton" scope. This skips a large amount of repeated analysis of fields and public methods and constructor/method arguments.

        It does introduce a tiny change in semantics, in that an @Autobuild parameter to a service will be cached and reused, rather than recreated on each construction.

        Show
        Howard M. Lewis Ship added a comment - Tapestry now generates a reusable "plan" for invoking constructors or service builder methods, and will retain that plan for scopes other than the default "singleton" scope. This skips a large amount of repeated analysis of fields and public methods and constructor/method arguments. It does introduce a tiny change in semantics, in that an @Autobuild parameter to a service will be cached and reused, rather than recreated on each construction.
        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #539 (See https://builds.apache.org/job/tapestry-trunk-freestyle/539/)
        TAP5-1665: Tapestry could create non-singleton services more efficiently
        TAP5-1665: Tapestry could create non-singleton services more efficiently

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1175104
        Files :

        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/AbstractMethodInvokingInstrumenter.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ModuleImpl.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBuilderMethodInvoker.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/MethodInvoker.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/IntegrationTest.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/ServiceBuilderMethodInvokerTest.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/ServiceDecoratorImplTest.java

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1175103
        Files :

        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/AbstractReloadableObjectCreator.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ConstructorServiceCreator.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/ConstructionPlan.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/ConstructorInvoker.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InitializationPlan.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/LoggingInvokableWrapper.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/IntegrationTest.java
        • /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/DefaultModuleDefImplTest.java
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #539 (See https://builds.apache.org/job/tapestry-trunk-freestyle/539/ ) TAP5-1665 : Tapestry could create non-singleton services more efficiently TAP5-1665 : Tapestry could create non-singleton services more efficiently hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1175104 Files : /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/AbstractMethodInvokingInstrumenter.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ModuleImpl.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBuilderMethodInvoker.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/MethodInvoker.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/IntegrationTest.java /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/ServiceBuilderMethodInvokerTest.java /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/ServiceDecoratorImplTest.java hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1175103 Files : /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/AbstractReloadableObjectCreator.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ConstructorServiceCreator.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/ConstructionPlan.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/ConstructorInvoker.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InitializationPlan.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/LoggingInvokableWrapper.java /tapestry/tapestry5/trunk/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/IntegrationTest.java /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/DefaultModuleDefImplTest.java

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development