move hook_modules_* to install files?

Created on 15 November 2009, almost 15 years ago
Updated 25 June 2023, about 1 year ago

I was surprised to find that the new hooks to act on module status changes ( #253569: DX: Add hook_modules to act on other module status changes ) live in the main module file.
Would there not be optimization in putting them in the install files?

ack "Implements? hook_modules_" gets me 12 functions in 5 module files.
The tradeoff would be having to load all install files when modules' statuses are changed - slimming everyday actions at the expense of fattening a rare action.

📌 Task
Status

Needs work

Version

9.5

Component
Install 

Last updated 2 days ago

No maintainer
Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    I would move hooks on a .install file only when it is necessary to invoke hooks implemented from few modules, and those modules are known before invoking the hook. Loading the .install files for all the installed modules is quite a "time-consuming" activity.

Production build 0.71.5 2024