During a quick look into a performance issue that was causing time out issues on a new D6 site, I noticed that the menu was being rebuilt multiple times, called for each content type when invoked using module_invoke_all('node_type').

Reduced backtrace follows

sites\all\modules\cck\includes\content.crud.inc:605
sites\all\modules\cck\content.module:1371
includes\module.inc:471
modules\node\node.module:495
modules\node\node.module:459
modules\system\system.admin.inc:622
includes\form.inc:359
includes\form.inc:102
includes\menu.inc:346
index.php:18

By placing a quick check on the rebuild function to prevent multiple calls, I halved the time required by "admin/build/modules".

Fatal errors here and in flush cache pages can kill drupal 6 sites, loss of the menu, loss of the blocks, etc; http://drupal.org/node/254616, along with many more issues, suggests that this is a fairly important issue to address.

Cheers

Comments

yched’s picture

Status: Active » Fixed

A few things have changed on this regard post RC4, and I can't reproduce this with current 6.x-2.x-dev.
We do *1* menu rebuild when needed :
- new field is created
- field label is changed
- field is deleted
If that menu rebuild takes too much time too easily, then this is a core problem, cck can't do anything about it.

Not sure what you mean about module_invoke_all('node_type') - cck doesn't do any menu_rebuild() in hook_node_type (maybe it did in RC4...)

Marking as fixed - please reopen if you have new info with latest dev CCK

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

alan d.’s picture

Just an update. The performance hit was due to a large number of content types defined in hook_element_info all being processed at the same time. Once these were processed, the issue went away.

This was where the node_type hook was triggering CCK.

Thanks