Closed (works as designed)
Project:
Drupal core
Version:
6.x-dev
Component:
theme system
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
17 Jan 2007 at 19:59 UTC
Updated:
21 Aug 2018 at 03:30 UTC
Jump to comment: Most recent
Comments
Comment #1
Frando commentedNothing gets executed twice, as drupal_bootstrap is keeping a static array of bootstrap phases, and it will only execute phases that haven't been executed yet. So the overhead caused by this line is ridicolously minimal (think of one integer comparison).
So if we need to have bootstrapped drupal up until DRUPAL_BOOTSTRAP_DATABSE to init the the theme layer, why not call it?
It makes it possible to call init_theme from anywhere without having to worry about wether there is already a database connection available or not.
Comment #2
Frando commentedComment #3
Anonymous (not verified) commentedThe staticness of $phases is just to keep $phases from being initialized more than once. The code executes more than once from what I'm seeing.
And _drupal_bootstrap doesn't prevent the duplicate execution of conf_init and neither does conf_init.
Please correct me.
Comment #4
Anonymous (not verified) commentedI'm correcting myself: the array_shift causes the staticness of $phases to not loop through the arrays again.
Comment #5
RobRoy commented@earnie - Feel free to mark won't fix or by design once an issue is cleared up like this so it keeps the issue queue clean.
Comment #6
Anonymous (not verified) commentedI still think the patch needs applied. Each minuscule piece of irrelevant code speeds up the code by minuscule amounts. Leaving irrelevant code doesn't make since.
Comment #7
Anonymous (not verified) commentedComment #8
RobRoy commentedI think this line "It makes it possible to call init_theme from anywhere without having to worry about whether there is already a database connection available or not." means that it IS relevant. Marking by design, but feel free to re-open if you really want.
I think there are much better issues to focus on like this one: http://drupal.org/node/92630.