Before you go out and rewrite all your code, consider what your goals are with this. The decision, ultimately, should be driven by data, rather than perception. Also consider: Do you have performance benchmarks? Are you running an op-code cache? Is simply buying more RAM for the server less expensive than your time spent reconfiguring these modules? How does front-end performance affect page load comparatively? Food for thought.<div>
<br></div><div>Performance optimization can come in many different flavors -- sometimes the low-hanging fruit is a better approach than radically altering your development practices.</div><div><br></div><div>Also peruse some of the posts at <a href="http://groups.drupal.org/high-performance">http://groups.drupal.org/high-performance</a></div>
<div><br></div><div>Happy tuning :)</div><div><br><div class="gmail_quote">On Wed, Feb 2, 2011 at 8:34 AM, nan wich <span dir="ltr">&lt;<a href="mailto:nan_wich@bellsouth.net">nan_wich@bellsouth.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><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" target="_blank">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"></div></font><div class="im"><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></div></blockquote>
</div><br></div>