[development] Question on Drupal 6 menus

Derek Wright drupal at dwwright.net
Fri Jan 4 22:46:23 UTC 2008

On Jan 3, 2008, at 6:28 PM, Khalid Baheyeldin wrote:

> The reason I added the file element is that I got an error on  
> another module
> (system.admin.inc ...) and that element made it go away.

For clarity:

system.admin.inc is not a "module".  It's an include file that should  
be included by system.module when it's doing admin-related things.   
system.module is a module.  The .module files for every enabled  
module are always loaded when bootstrapping Drupal.  The performance  
gain from splitting modules up into .inc files (made easier by the D6  
menu changes) is that you don't have to load all the code that's only  
rarely used in your .module files.

Peter's point is that you should never tell the menu system to  
include a .module file again, since those are *always* loaded.  You  
should only tell the menu system to include a .inc file, never  
a .module file.

-Derek (dww)

More information about the development mailing list