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

When rendering a PageLink, it should not be necessary to load the target page instance just to see if there's a page activation context

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.0
    • Fix Version/s: 5.1.0.0
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      Currently, generating a page render link (inside LinkSource) will load an instance of the target page to fire a "passivate" event on the instance.

      This is wasteful. Tapestry should know what events the page instance handles (this could be determined during class transformation, in the same way that we determine what render phases each component implements). It should then be possible to avoid loading a page unless it has a passivate event handler.

      This could make a big different to application start-up time, as each page referenced from the initial page must be fully loaded.

      The downside is that often, loading the pages early causes an early failure: i.e. if page Login has an error and page Index has a page link to it, we'll see that error on first request (because the PageLink forces a load of the Login page). With this improvement, the Login page error wouldn't be seen until the user navigated to the page. I see that as acceptible.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: