Does Drupal parse (and/or run) hooks that are unrelated to the content being loaded by the current user?
For example, say I had a module foo
installed and active with the following hooks:
<?php
// .. stuff ...
function foo_menu() {
$items = array();
$items['foo/show'] = array(
'title' => t('Foo!'),
'page callback' => 'foo_display_all',
'description' => 'All our foo are belong to you',
'type' => MENU_NORMAL_ITEM,
);
return $items;
}
function foo_display_all() {
// About 100 lines of code
}
// ... stuff ...
Would Drupal parse (and thus effect the load time) for pages that aren't listed in foo_menu
? Put another way, would the length and complexity of foo_display_all
effect how www.example.com/bar loads?
At risk of having two different questions here, I'll say I would be grateful for an explanation (or link to an explanation) of how and why Drupal does or does not parse, rather than a yes/no answer.