I have a custom drush command that does some pretty heavy node creation etc. I would like to disable certain modules only for the duration of the script to improve their performance.
I can not do a drush dis module_name
before running my command because I need the modules to be active on the site while the script is running, but not active for the runtime environment of the current command.
I would rather not have to hack core, but from what I can see, I'm probably going to need to alter something in either module_list()
or drupal_load()
since neither of them have any hooks.
Is there any way to do what I'm after without hacking core?