<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><DIV></DIV>
<DIV>You can split the module into several modules (which will, of course, have to be enabled). In your example, the block code could be in a separate module (see <A href="http://drupal.org/project/weblinks">http://drupal.org/project/weblinks</A>). However, any opcode caching that you use is going to keep more execution-ready code in memory than you might think. My last customer used e-Accelerator with a 32 MB cache size and this was a tremendous boost to performance, but with smaller memory (VPS, shared) installations, may not be the best idea.</DIV>
<DIV> </DIV>
<DIV>@jcisio: To be more precise, the hooks must be in your .module <EM>namespace</EM>. I found this by accident when I started playing with sub-modules. For example, create a xyz.module, then create xyz_sub.module with xyz_block(); you will find that the blocks are available as though they were in xyz.module.<BR> </DIV>
<P><FONT color=#ff007f size=4 face="bookman old style, new york, times, serif"><EM><STRONG>Nancy</STRONG></EM></FONT></P>
<P> </P>
<P><FONT face="arial, helvetica, sans-serif">Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.</FONT></P>
<DIV><BR></DIV>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12pt"><BR><FONT size=2 face=Tahoma>
<DIV style="FONT-FAMILY: Courier New, monaco, monospace, sans-serif; FONT-SIZE: 10pt">
<HR SIZE=1>
</DIV>
<DIV style="FONT-FAMILY: Courier New, monaco, monospace, sans-serif; FONT-SIZE: 10pt"><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> jcisio</DIV>
<DIV style="FONT-FAMILY: Courier New, monaco, monospace, sans-serif; FONT-SIZE: 10pt"></FONT><BR>It depends on which Drupal you are using, D6 or D7. Read the<BR>documentation about D7, where you can split your .module into multiple<BR>files.<BR><BR>In D6, in general, all hook implementations must be presented in your<BR>.module file. However, except your module is too big, this micro<BR>optimization has only negligeable profit.</DIV></DIV></div></body></html>