Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
5.1.0.0
-
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.