Problem/Motivation

It's pointless to get the directory of the current template for every template.

Proposed resolution

Move it to _template_preprocess_default_variables()

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 2554013-1.patch1021 bytesdawehner
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner created an issue. See original summary.

dawehner’s picture

Status: Active » Needs review
FileSize
1021 bytes

Small thing.

Wim Leers’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Performance

Hah! Excellent find!

+++ b/core/includes/theme.inc
@@ -1202,6 +1199,10 @@ function _template_preprocess_default_variables() {
+
+
   return $variables;

One too many \ns, can be fixed on commit.

star-szr’s picture

+1, thanks!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 8ce356a and pushed to 8.0.x. Thanks!

  • alexpott committed 8ce356a on 8.0.x
    Issue #2554013 by dawehner: Save 5 function calls for every rendered...

Status: Fixed » Closed (fixed)

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