Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-99

Frequently instantiated service implementations should have a specialized instantiation class created to prevent extra reflection calls

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Abandoned
    • 5.0.15
    • None
    • None
    • None

    Description

      From the department of premature optimization:

      For services that are scope "perthread", the service implementation will be invoked repeatedly, via either invoking a constructor, or invoking a (static or instance) builder method on a module class.

      Currently each such instantiation requires calculating the method/constructor parameters (somewhat expensive) and invocations of the method/constructor via reflection (borderline expensive).

      The code responsible for this could track the number of instantitations and, on the second (or later) pass, create a "shim" class responsible for performing the same operations in a non-reflective way.

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            hlship Howard Lewis Ship
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: