Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Apr 2013 at 02:35 UTC
Updated:
29 Jul 2014 at 22:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
star-szrSomething like this?
Tested on a page that renders a node as well as 200 fields in a Views table via views-view-field.html.twig.
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=517896dc57c6e&...
Comment #2
fabianx commentedI like this!
Pretty straightforward code, has benchmarks to back it up, theme system things are called like 1000 times, so effect will be even higher (more like 25-30 ms).
6 kB more vs 4-5 ms saved is a really pretty deal!
Comments are nice, tests still pass, can't think of anything else.
It is free performance, lets take it :-).
=> RTBC
Comment #3
star-szrThanks for reviewing @Fabianx! I think this qualifies as a quick fix :)
Comment #4
alexpottNeeds to document the function params... and according the docs should be
Overridesand notImplements...Comment #5
soulston commentedComment #6
soulston commentedRe-rolled, thanks for the help @alexpott
This function is overriding so inherit the documentation using {@inheritdoc}.
Comment #7
catchIs there an upstream issue/pr for this?
Comment #8
star-szrI'll create a pull request later today (in about 4h).
Comment #9
star-szrHere's the PR: https://github.com/fabpot/Twig/pull/1071
Comment #10
catch#6: 1979290-6.patch queued for re-testing.
Comment #11
alexpottCommitted dced5e1 and pushed to 8.x. Thanks!
Obviously if the Twig PR lands we can rolls this back... nice work btw!
Comment #13
fabpot commentedJust for your information, the patch has been just merged upstream.
Comment #14
star-szrThanks @fabpot!
Comment #15
star-szrThis was reverted upstream due to a BC break:
https://github.com/fabpot/Twig/pull/1071#issuecomment-27481011
https://github.com/fabpot/Twig/issues/1251