Quantcast
Channel: User anschauung - Stack Overflow
Viewing all articles
Browse latest Browse all 40

Does Drupal parse hooks that aren't being used?

$
0
0

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.


Viewing all articles
Browse latest Browse all 40

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>