Can the 'update' module be made less aggressive? Running an update check on all the installed modules on my site takes quite some time, and sometimes even exceeds PHP's runtime limits. Leaving the module enabled makes using the web based administration very difficult, as many different actions cause it to make a full run.

Is there a way to leave the module enabled, but only have full updates triggered by cron instead of every time the status or module pages are visited in admin?

I'm using Drupal 6.26.
As far as I can tell there's nothing about visiting the modules admin page (or any other admin page) that would invoke a check for update data.

Drupal 6

For Drupal 6 the work is done by _update_refresh(), which is inadvertently called from several places within the update module itself. Those of note include:


update_cron() - called only during a cron run.
update_status() - page callback, only invoked when visiting the update report page.
update_requirements() - invoked when you visit the status page.


Since none of those are called for every admin page, and Drupal 6 doesn't have auto-cron (you also mentioned in the comments you don't have poormanscron installed), it doesn't seem like any of the core functions will be the culprit.

There's no way to unset hook implementations for specific modules in Drupal 6 (there is in Drupal 7, see below) so short of editing the module file directly I don't think there's anything you can do about that.

Drupal 7

The work is done by update_get_available(), and that function is only called from 4 places by core:


update_cron() - called only during a cron run.
update_manager_update_form() - page callback, only invoked when visiting the update manager page.
update_requirements() - invoked when you visit the status page.
update_status() - page callback, only invoked when visiting the update report page.


If the update is happening on any other pages than those listed above it's either caused by a contrib/custom module, or (more likely) because you have auto-cron on, and the cron run is being invoked. There might be more to it than that but I can't find anything looking through the core code.

As far as the status page goes, you could remove the update module's implementation of hook_requirements() from the cached list of hook implementations, effectively stopping the check from happening when you go to that page. It means you won't ever get that particular line in the status report, but if you're ok checking for updates manually then this won't be a problem.

The way to do this is to implement hook_module_implements_alter() in a custom module:

function MYMODULE_module_implements_alter(&amp;$implementations, $hook) {
  if ($hook == 'requirements') {
    unset($implementations['update']);
  }
}


Either version

You can slow the frequency of update-checks down a bit by setting the update_check_frequency variable to something longer than standard. The variable contains the number of days that need to pass before the update data is checked again.