include_once(drupal_get_path('module', 'pageroute') .'/pageroute.route.inc');
include_once(drupal_get_path('module', 'pageroute') .'/pageroute.page.inc');
This happens currently everytime, but it should only happen when a route is actually used (or edited).
Thus also the includes of the page types shouldn't include page.inc again.
"include_once(drupal_get_path('module', 'node') .'/node.pages.inc');"
should be moved also into the separate page type includes, however take care things stay working as $form might be cached when using submit buttons to by the form (mutistep form!). But by keeping the include at the top of the page type include file should do it.
Comments
Comment #1
sepgil commentedMade a patch that includes only when a the route or page classes are really needed. I had to merge the route and the page classes into one file(pageroute.route.inc), so it can be included via the menu hook.
Comment #2
sepgil commentedThe merge between pageroute.page and pageroute.route is missing in the last patch, I've corrected it.
Comment #3
fagothanks, committed.