node_types_rebuild calls _node_types_build() unnecessarily, adding a slight performance overhead.

function node_types_rebuild() {
  _node_types_build();

  $node_types = node_get_types('types', NULL, TRUE);

It's redundant because node_get_types already calls _node_types_build() (when the $reset parameter is true):

function node_get_types($op = 'types', $node = NULL, $reset = FALSE) {
  static $_node_types, $_node_names;

  if ($reset || !isset($_node_types)) {
    list($_node_types, $_node_names) = _node_types_build();
  }

Comments

manarth’s picture

Status: Active » Needs review
Issue tags: +Performance

Status: Needs review » Needs work

The last submitted patch, node.remove_redundant_call.patch, failed testing.

manarth’s picture

Status: Needs work » Needs review
StatusFileSize
new617 bytes

Rerolling patch from drupal root directory (instead of within node module).

Status: Needs review » Needs work
Issue tags: -Performance

The last submitted patch, node.remove_redundant_call.patch, failed testing.

manarth’s picture

Status: Needs work » Needs review

#3: node.remove_redundant_call.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, node.remove_redundant_call.patch, failed testing.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.