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.
| Comment | File | Size | Author |
|---|---|---|---|
| multiple_require_once_1.patch | 1.26 KB | dawehner |
Comments
Comment #1
dawehner8128 passes, 0 fails, and 0 exceptions
Comment #2
Anonymous (not verified) commentedlooks sane, trivial patch, RTBC.
Comment #3
dries commentedCommitted to CVS HEAD. Thanks! :)