as you see here:

<?php
      // Invoke hook_schema for all modules.
      foreach (module_implements('schema') as $module) {
        $current = module_invoke($module, 'schema');
        require_once DRUPAL_ROOT . '/includes/common.inc';
        if (drupal_function_exists('_drupal_initialize_schema')) {
          _drupal_initialize_schema($module, $current);
        }

        $schema = array_merge($schema, $current);
      }

require_once is called multiple times, even if its not needed here

so i moved the require_once up, so its called only once
-> a little more performance

patch is included running tests.

CommentFileSizeAuthor
multiple_require_once_1.patch1.26 KBdawehner

Comments

dawehner’s picture

Status: Active » Needs review

8128 passes, 0 fails, and 0 exceptions

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

looks sane, trivial patch, RTBC.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks! :)

Status: Fixed » Closed (fixed)

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