<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
<TT><FONT COLOR="#140d0a">hello, </FONT></TT><BR>
<TT><FONT COLOR="#140d0a">thanks for all replies</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#140d0a">here is what i got so far:</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#737373">&gt; The main problem is that Drupal 5 and earlier by design loaded ALL code on </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; every page load.&nbsp; In Drupal 6 we introduced split include files for page </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; callbacks, so most of those &quot;foo.admin.inc&quot; and &quot;foo.pages.inc&quot; files are not, </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; in fact, loaded on every page request but only when needed.&nbsp; There are similar </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; techniques that individual modules can implement if necessary for their own </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; code, and some of the larger ones like Views and CCK do, but there's no </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; central mechanism for it.</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#140d0a">All my modules are split to many .inc files loaded only when needed. But drupal </FONT></TT><BR>
<TT><FONT COLOR="#140d0a">still includes all 67 .module files.</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#737373">&gt; Hooks aren't the issue per se, although it is true that there's a cost to </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; checking 50 modules for a hook.</FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; Both of those are seeing major improvements in D7, but they're not anywhere </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; near production ready yet.</FONT></TT><BR>
<BR>
<BR>
<TT><FONT COLOR="#737373">&gt; An opcode cache will help immensely for the first problem, as that's the main </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; thing it solves.&nbsp; Proper tuning of the cache (you can set it to not even stat </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; the disk) will help, too.</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">I tried APC ... load times are faster but not enough :D</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">(according to APC stat, there is enough cache memory and other settings</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">seem OK too)</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">I tried turn off file modification chceking ... not much improvement</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">and APC include_once hack ... with that option set, drupal refused to</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">start ...</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#737373">&gt; Beyond that, depends on your modules.&nbsp; You may find some you do not, in fact, </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; need.&nbsp; </FONT></TT><BR>
<TT><FONT COLOR="#140d0a">Actually, problem is that i need all of them ;). There are few core</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">modules. All other modules are custom and are used daily. (Most of them</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">are just form and &quot;do-something-with-external-system&quot; when submitted.)</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#737373">&gt; Others you could look into improving by implementing some sort of lazy-</FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; loading mechanism like Views does.&nbsp; (I believe Views' mechanism is being split </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; off to the ctools module, now in alpha.)&nbsp; You'd have to work with the </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; maintainers for those.&nbsp; Some modules wouldn't really support it, sadly.</FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; For external systems, definitely look into proper caching, even if you think </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; it's fast.&nbsp; You can also look into tuning the block cache, or using memcache </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; instead of the default db caching, perhaps, but that's probably overkill if </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; you are just running an intranet server.</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#140d0a">Problem with caching is that all modules use &quot;live&quot; data, or are</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">generating unique reports. I can't cache anything.</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#737373">&gt; Anyway, that's just general purpose advise.&nbsp; And, um, no, don't hack core.&nbsp; </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; Really.&nbsp; You will regret it.&nbsp; Maybe not today, maybe not tomorrow, but soon, </FONT></TT><BR>
<TT><FONT COLOR="#737373">&gt; and for the rest of your life.</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#140d0a">I know that hacking core is the last resort and is generally bad</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">idea :D.</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#140d0a">-------------------------------------------------------------------------------------------------</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#140d0a">And there is another thing that can help: I need that only one module</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">(used most and in critical process) should be as fast as possible. So i</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">tried little trick:</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">There is function list_modules in core returning list of modules witch</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">are then loaded. As i only need one module to be as fast as possible and</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">i don't really care about others. In the list_modules function i check</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">witch module is being loaded (something like if $q is like /is/*). If</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">it's my module - instead of full module list, I return manually created</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">reduced module list. Result is that only 17 modules out of 67 are</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">loaded ... but the problem is that it didn't helped much :( - maybe the</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">bottleneck is somewhere else and not in drupal module load system.</FONT></TT><BR>
<BR>
<BR>
<TT><FONT COLOR="#140d0a">I'm going to try few more tricks :) and I write back when I find out</FONT></TT><BR>
<TT><FONT COLOR="#140d0a">something interesting.</FONT></TT><BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
</BODY>
</HTML>