[development] reducing module size
Dave Metzler
metzler.dl at gmail.com
Wed Feb 2 14:54:11 UTC 2011
In D6I tend to use the include mechanism provided in hook menu, but there is nothing wrong with including files as you need them... (e.g. At the beginning ofbthe hook block call. Loading them in init means they get loaded whether you use them or not.
Sent from my iPad
On Feb 2, 2011, at 4:46 AM, Bob Hutchinson <hutchlists at midwales.com> wrote:
> I have a module whose functions are only used by logged-in users, it provides
> nothing to 'Anonymous' users except for a block.
> I'm considering loading most of the functions only when $user->uid > 0
> probably in hook_init()
>
> My question is, which functions would have to be loaded in order for things
> not to break, apart from the block functions (and any that it uses)?
>
> Any insights would be most welcome before I try it out.
>
> --
> -----------------
> Bob Hutchinson
> Midwales dot com
> -----------------
More information about the development
mailing list