Problem/Motivation

Having hook_boot() defined on production sites creates unnecessary overhead, especially when $conf['environment_modules'] shouldn't be defined on production (according to the documentation).

Proposed resolution

If $conf['environment_modules'] is not present, don't define hook_boot() which will speed up page rendering for cached pages.

Since module_hook() is used to check for availability of hook_boot() before being called, there won't be any adverse affects from a hook_boot() implementation disappearing.

Comments

markpavlitski’s picture

Status: Active » Needs review
StatusFileSize
new1.23 KB

The attached patch puts a conditional around the hook_boot() implementation so it's only defined when $conf['environment_modules'] is defined and not empty.

miikamakarainen’s picture

Assigned: Unassigned » miikamakarainen
Status: Needs review » Fixed

Patch works, code added to 7.x-1.4 release. Thank you for your work.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.