When hook_init is called, you are calling: $node = menu_get_object() which then can sometimes call whole menu_rebuild() process within menu_get_item(). On very large sites, this can be a heavy duty burden that really isn't necessary if you don't have head scripts.
I have places a check on hook_init && hook_page_alter to prevent it from going into the logix if there are no snippets.
| Comment | File | Size | Author |
|---|---|---|---|
| check-for-snippets.patch | 2.7 KB | labboy0276 |
Issue fork tracking_code-2925281
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
anybodyThis issue is still very relevant and should be merged into the 7.x-1.x version. I'll prepare a MR.
Comment #3
anybodyPatch from #1 as MR. Changes are fine and this is still important, as described in the issue summary. Setting priority to Major for the performance reasons.
RTBC!
Comment #7
anybodyComment #11
fathershawnSufficient changes were recently merged that a local rebase was required. This change looks pretty straightforward to me but please re-check.
Comment #12
anybodyThank you, I was also just on the way for the rebase.
Changes are fine. The "new" array() => [] syntax might be dangerous for super old PHP versions, you decide. I'm fine with that.
Comment #13
anybodyTo be 100% safe, I'll change the syntax to the old one and merge it then, ok?
Comment #14
fathershawnSounds good - my ide clearly just switched it - I had it set to php 7.1
Comment #15
anybodyComment #16
fathershawnThis looks good on a code level. Has anyone verified this change locally?
Comment #17
anybodyYep, works fine!
Comment #19
anybodyMerged! Going to tag a release now.
Thank you!