There are two issues here. First, the performance of rebuilding the menu is horrible: #302638: No-op and slow queries during menu rebuild Second, I challenge the assumption that viewing the modules page is the right time to rebuild the router table. After all, how could this NOT be slow when simply getting the form does this?

function system_modules($form_state = array()) {
  // Clear all caches.
  registry_rebuild();
  drupal_theme_rebuild();
  node_types_rebuild();
  cache_clear_all('schema', 'cache');
  // Get current list of modules.
  $files = system_get_module_data();

I suggest we move all that crud to the submit handler.

CommentFileSizeAuthor
kill_fewer_kittens.diff1.18 KBrobertdouglass

Comments

robertdouglass’s picture

Title: Waiting for #Drupal's menu rebuild to happen every time I look at the modules page makes me want to torture kittens. » Waiting for Drupal's menu rebuild to happen every time I look at the modules page makes me want to torture kittens.
Issue tags: +Performance

Status: Needs review » Needs work

The last submitted patch failed testing.

acrollet’s picture

subscribing. best patch name evah btw

chx’s picture

Status: Needs work » Closed (duplicate)
beltofte’s picture

subscribing

EvanDonovan’s picture

Well, even if this is a duplicate issue, would there be ill effects if I moved all those function calls to the submit handler in my copy of Drupal 6.x?