[development] The Drupal Diet - Making bootstrap faster
metzlerd at metzlerd.com
Thu May 10 13:43:21 UTC 2007
For some reason I was lying awake at night thinking about drupal boot
strapping (dear lord help me). And it occured to me that although
the frequency of use is certainly the right measure to decide what to
load, that it probably isn't by technology, so I came up with a
couple of different ways to think about this.
BY MENU PATH
1) System stuff - api's etc that need loading all the time.
2) node viewing pages (node* paths/routes) (not so sure this would work)
3) User settings (not sure about this one, but maybe anything with a
user* menu path
4) admin pages (basically everything with an admin/blah route path
You could even consider doing the admin pages based on a permisssions
test (access admin pages). The module_name.module files would
always load, but maybe there would be room for a
modulename.admin.module or a modulename.user.module file that would
be conditionally loaded based on either path or user permissions or
some other criteria.
Or alternatively a namespace based approach where when a module is
going to make a call that relies on another module it basically does
an "import" of namespace (the way its done in java) This would make
a bootstrap call that would load the modules that claim that
namespace. (etiher in .info files or in a hook).
More information about the development