Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
2 Oct 2014 at 09:37 UTC
Updated:
13 Oct 2015 at 12:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
manuel garcia commentedHere is a patch to get started, which removes the theme_ function.
If there isn't a theme_ function, the views hook_theme implementation picks up the twig file fine, but all the HTML is escaped. Not sure why this is.
Comment #2
manuel garcia commentedOK, a quick update on this one...
This twig file is practically unusable due to twig autoescaping template files. So unless we figure out a way to go around this, I believe this twig file should be removed perhaps, since it just wont work if you use it in your theme.
Steps to see this in action:
Comment #3
manuel garcia commentedOK, so after some chat with dawehner in IRC, This is what has been tried:
String::checkPlain()calls from FieldPluginBase::elementType(), FieldPluginBase::elementLabelType() and FieldPluginBase::elementWrapperType() ->core/modules/views/src/Plugin/views/field/FieldPluginBase.php.String::checkPlaincall on the label inside thetemplate_preprocess_views_view_fieldsfunction incore/modules/views/views.theme.inc.These changes did NOT have an effect apparently.
So currently the only way to get actual useful output from this twig file is to print out everything using the |raw twig filter (thanks Fabianx for the tip!). This is not the right solution most probably.
Perhaps we should split the double escaping problem into its own issue?
Comment #4
manuel garcia commentedhere is the patch with the changes commented on #3, in case anyone wants to take a look.
Comment #5
manuel garcia commentedComment #8
manuel garcia commentedWe'll be tackling the offending twig file here #2348747: Convert theme_views_view_fields() to 100% Twig: remove the theme function
Comment #9
bbujisic commentedThis patch builds upon patch #4 but it moves all the HTML generation from preprocess function to twig file, thus avoiding HTML sanitation.
Comment #10
lauriiiI like the way stuff is moving to template. That way we can get rid of double autoescaping issues. Perfect!! Maybe we should fix some documentation to the twig file to make it easire to understand.
Comment #12
bbujisic commentedPatch #11 replaced deprecated drupal_clean_css_identified() function call with Html::cleanCssIdentifier() in views_view_field preprocess function and updated documentation in views-view-fields.html.twig file.
Please review.
Comment #13
bbujisic commentedPatch #11 replaced deprecated drupal_clean_css_identified() function call with Html::cleanCssIdentifier() in views_view_field preprocess function and updated documentation in views-view-fields.html.twig file.
Please review.
Comment #15
manuel garcia commentedI just uploaded a patch to the child issue to tackle the twig file on its own. It is very much in the same direction as #9, see: #2366167: views-view-fields.html.twig prints out escaped html tags
Comment #16
bbujisic commented@Manuel Garcia: I believe my patch (#9 and #11) avoided the need for |raw filters. If you agree, let's close the #2366167: views-view-fields.html.twig prints out escaped html tags and continue polishing in this thread.
Comment #17
lauriiiLet's see if this fixes the tests :)
Comment #19
roderikNow this template is used, the HTML apparently has more spaces between the >/span< for the label and the >span< for the value. (See screenshot.)
So
$this->assertText(t('Updated date') . ': ' . date('Y-m-d', REQUEST_TIME));would need to change to$this->assertText(t('Updated date') . ': ' PLUS NEWLINE PLUS CERTAIN AMOUNT OF SPACES . date('Y-m-d', REQUEST_TIME));I think this patch is the way to do it. Disclaimer: I have no opinion on whether this is the right solution, or the rest of this issue.
Comment #20
lauriiiThanks @roderik for debugging this! I hope we could tackle this on the template by
{% spaceless %}Comment #21
lauriiiLets see if this works out
Comment #23
manuel garcia commentedComment #26
manuel garcia commentedrerolling..
Comment #27
manuel garcia commentedRerrolled.
The only thing was that this was already done in some other issue:
Comment #28
star-szrLooking at the list of remaining theme functions this would be a great one to get rid of if we can.
Comment #29
star-szrI think there shouldn't be a space before printing the attributes in all of these cases. https://www.drupal.org/node/1823416#attributes
Comment #30
joelpittetCurious what you guys think of this for template formatting?
Comment #31
joelpittetI think this got lost in translation?
Comment #32
joelpittetRe #31 It was ignored and not used. Not sure it needs to stick around.
Hopefully you like the syntax I chose on this, that verbose if was getting to me. Also dropped the spaceless because it has some performance issues, but if it hurts the inline elements in anyway we can add it back.
Comment #34
joelpittetIgnore that:P it looks prettier than functional;)
Comment #35
joelpittetspaceless doesn't work inside other controls (the if statements). So these whitespace modifiers work at collapsing the space (especially before and after span elements and the separator.
For proof: http://twigfiddle.com/twrci4
Comment #36
manuel garcia commentedAwesome @joelpittet!
I have been manualy testing the patch #35 in the UI. The output looks great, and it all seems to work. Tested:
On the field settings, disabled the option "Provide default field wrapper elements" - Result: all fields not customizing their "Style settings" get no markup, as expected.
Customized the "Style settings" for several fields:
For these three, tested also its child options Create a CSS class, Customize label HTML, Customize field and label wrapper HTML:
These are global, also working:
I'd RTBC this but looks like we'll need to profile this...
Comment #37
davidhernandezThis is what I'm seeing. :(
Run 54dec09b09eb9 uploaded successfully for drupal-perf-davidhernandez.
Run 54dec1ab3dfb1 uploaded successfully for drupal-perf-davidhernandez.
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54dec09b09eb9&...
Run 54dec09b09eb9 uploaded successfully for drupal-perf-davidhernandez.
Run 54dec21b63f84 uploaded successfully for drupal-perf-davidhernandez.
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54dec09b09eb9&...
Comment #38
joelpittetWhat scenario are you working with there for some context?
Comment #39
davidhernandezOh sorry. That would help wouldn't it. :P
I made a view displaying 100 nodes, 4 fields each. 2 with labels, two without. I wasn't sure exactly what setup to profile with, so if you have something specific in mind, let me know.
Comment #40
joelpittetThanks a bunch for doing the profiling @davidhernandez! From first glance it looks like ~1ms per row is being added. That scenario sounds like a good one. And a big hunk of that time is SafeMarkup related (security), and getAttribute (twig C version would make this faster). I'm assuming you don't have the twig C extension installed?
I'll try to mimic the results and see if I can't shave a few microseconds off each row.
Comment #41
star-szrAlso to confirm, twig_debug and XDebug off? Thanks @davidhernandez :)
Comment #42
davidhernandezNooope! It's been a while since I last profiled, and forgot to adjust my settings. Apparently, I enabled "Give Joel a heart attack".
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54df8d322535a&...
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54df8d322535a&...
Comment #43
davidhernandezDoes such a large decrease in memory usage make sense?
Comment #44
joelpittetOh sweet! I was thinking up preprocess trickery but now I don't need to:) I'll do some of that in another issue;)
I shouldn't RTBC this but @Manuel Garcia or @davidhernandez, you can if you are cool with things. Or maybe @lauriii wants to give it another quick check?
Comment #45
lauriiiAfter manual testing and reading the change going to RTBC this. I also added the beta evaluation.
Comment #46
manuel garcia commentedAdded two missing dots on comments.
Comment #47
star-szrDocumentation looks good, performance looks good, and we are not changing markup. I reviewed the patch and manually tested, putting my stamp of approval on this one! Thanks all :)
Comment #48
davidhernandez+1
I tried this along with the patch I had to copy all the Views templates to Classy. Test that were failing before are now passing. I didn't check all the tests, but all the ones I did check are green.
Comment #49
joelpittetFYI, all those tests were failing because this code was building up HTML tags but not marking it as safe markup in one fasion or another:
Incase you run into similar failing tests, it's likely concatenated markup in a preprocess or earlier which is not being marked as such. #markup renderable array or #inline_template would have solved that, but it hadn't been done yet.
Thanks everyone!
Comment #50
joelpittetOh and this kills both birds with one stone. Safemarkup in the template issues + removes theme function!
UsefulTemplates++
Comment #51
dawehnerSo we benchmarked that before, right? Can you explain why the performance is less bad this time?
Comment #52
joelpittet@dawehner twig debug was turned on and it was printing debug information and xdebug was turned on.
Comment #53
davidhernandezYeah I forgot to adjust my environment in the first test, so ignore #37. No code was changed when I made the second one.
Comment #54
webchickAsked dawehner about this in IRC. He was referring to the benchmarks in a related Views patch at #1843748-50: Convert views/templates/views-view-fields.tpl.php to twig, and wants to make sure we don't introduce a similar regression here, by using the same performance scenario. Marking back to needs review for benchmarks.
Comment #55
joelpittetWell I got two fairly similar profiling results by trying to match the scenario from #1843748-45: Convert views/templates/views-view-fields.tpl.php to twig
Here's my script for generating nodes:
https://gist.github.com/joelpittet/9fc3d6c224b8dfe73213
drush scr test-create-nodes.phpHere's my frontpage views export:
https://gist.github.com/joelpittet/2cc1a4f86f30d679aed8
I was getting high results at first then it seemed to settle down once I stopped using my computer while it was running...
First Set of Resultshttp://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54e141c217b7e&...http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54e141c217b7e&...Second Set of Resultshttp://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54e1529b7f3e4&...http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54e1529b7f3e4&...Comment #56
joelpittetTry to avoid comparing my results with @davidhernandez because we have difference scenarios as I'm trying to get something closer to the scenario from Portland 2013 drupalcon sprints. (Less rows more fields)
They were comparing PHP Template to Twig Template(which I think should have been faster because the Twig Template is compiled and run from a method, but I guess there are more function calls).
I'm not quite sure why my results are doing so well, though if someone wants to double check go ahead I'd be curious to see the results.
Comment #57
joelpittetDisregard #55 (except for the scenario) the numbers are toooo nice:) My opcode cache revalidate settings were set to production 60 sec refresh, this they set they are set to 0 for development.
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54e17147d69ca&...
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54e17147d69ca&...
Cottser was getting similar results ~11% walltime increase.
Comment #58
joelpittetOut of that 113ms the biggest time sucks are:
Twig_Template::getAttribute
__TwigTemplate_80fb64e3a166b4b555bfcf9b2057993f1e4339e4b1a0b907cef30b63e6177970::doDisplay
twig_drupal_escape_filter@2
We could shave some time off in the preprocessor, I think Cottser has a few ideas in mind so I'll let him at it first.
Comment #59
joelpittetJust to see what happens with Twig C Extension turned on:
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54e199664caef&...
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54e199664caef&...
Comment #60
dawehnerNote: views already escapes values, see FieldPluginBase::render().
Comment #61
joelpittet@dawehner Thanks for the note, something to ponder, does views need to escape the values if Twig is doing that automatically?
Comment #62
star-szrI may still poke at this in preprocess, but would love to know the answer to #61, it seems like that would potentially allow for much more savings if we're avoiding doing work twice.
Comment #63
manuel garcia commentedOK, after a quick chat with dawehner on IRC, and since twig already takes care of escaping content that we render through it, he suggested to remove the sanitizing once in
FieldPluginBase::render, and see if the performance improves.He also said that we should probably write some tests to make sure that content is actually escaped.
Comment #64
star-szrThanks @Manuel Garcia, that sounds good. I put up a couple patches on #2426563: Ignore: Patch testing issue to see what testbot thinks.
Comment #65
manuel garcia commentedGetting rid of
sanitizeValueonFieldPluginBase::render().Cottser tested this already (see #64), so this should come back green.
I've also did some manual testing on this, malicious code is still escaped, for example:
Tried entering
<script>alert('hacked');</script>as a class for a field, the result isclass="scriptalerthacked-script".I also tried a variety of other strings, everything is secured by twig, as expected.
Comment #67
davidhernandezName your interdiff files .txt or something other than .patch and that will keep them from getting sent to testbot.
I'm going to try to test this today.
Comment #68
star-szrComment #69
davidhernandezI ran some tests again. I tried to keep a similar scenario to previous, and created a View displaying 100 nodes with 5 fields.
This is using #46.
This is using #65 with the Views sanitization removed.
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54f283c5bb5f3&...
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54f283c5bb5f3&...
Let the skepticism begin. I'll see at some point if I can replicate Joel's scenario and test that instead, or maybe he'll beat me to it. ;)
Comment #70
davidhernandezI realized I didn't have render cache disabled. Maybe that was the issue I was having previously as well. Dunno.
46
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54f295e72ec52&...
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54f295e72ec52&...
65
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54f29a0893b1f&...
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=54f29a0893b1f&...
Comment #71
star-szrThanks @davidhernandez!
Somehow we're not losing any function calls :/
Comment #72
davidhernandezYeah, I noticed that too. I have no answer why. I checked the code in both branches and the sanitizeValue is there in 46 and removed in 65. It doesn't make sense, unless the change was irrelevant.
Comment #73
star-szrRelevant related issue from around the time of DrupalCon Portland.
Comment #74
star-szrI think the double escaping is still an issue, was doing some triaging of old issues and found #2363423: views-view-fields.html.twig gets escaped, should we fix the double escaping there in case this gets stuck?
Not saying we should postpone this but maybe some of the changes could be split out to make this smaller :)
Comment #75
manuel garcia commented@Cottser I started to decouple this on #2366167: views-view-fields.html.twig prints out escaped html tags a while ago but I now think that that patch is not the best way tackle this. We should fix this problem earlier in the pipeline like @dawehner suggested (see #63), and let twig handle the escaping on its own like everywhere else in core.
To me it would make sense to figure out every place this is happening in views, and work on the double-escaping bug on its own.
Comment #76
manuel garcia commentedOK since the patch #65 needed a reroll, I figured now would be a good time to split the bug out of this issue.
So this patch is the same as before, without removing the html escaping from views, which is now on the patch attached to #2363423: views-view-fields.html.twig gets escaped.
Comment #77
manuel garcia commentedJust so people reading up on this are aware, from a conversation on #drupal-twig on irc, it looks like this is not going to be committed because it brings "too much of a performance regression" :(
Comment #78
star-szrWe're not saying it's impossible, but so far nobody has been able to make it fast enough to be committable. 1% or less would be good but 8% or more is just not acceptable.
Sorry @Manuel Garcia if you feel you've wasted time here but the reality is not everything will make it in. Thank you for all your contributions and please continue!
Comment #79
joelpittetRegardless of whether we remove the
twig templatetheme function or not the markup build up and classes should be moved to the theme function.So I think we can salvage a lot of this work in the preprocess to slim that down. Also template in core is broken without those changes so I'm tempted to mark this as a major bug instead of a task and get that bit done at least.
What do you think @Cottser?
Comment #80
star-szrI'm not sure right now about the major bug part, but definitely +1 to moving that ugly stuff to the theme function :)
Separate issue?
Comment #81
manuel garcia commentedYes we have to move that stuff out of the preprocess in order to fix #2363423: views-view-fields.html.twig gets escaped as well. Only thing is that we need to do it on the template file as well (duplication). Not the end of the world I suppose.
I'm starting to question whether or not is a good idea to have this template at all, since the whole point of this is that all the markup, classes etc is configured through the views UI...
Comment #82
star-szrPostponing so we can focus on #2363423: views-view-fields.html.twig gets escaped. The performance improvements around SafeMarkup might improve performance here, will need another profiling after those get in, #2295823: Ensure that we don't store excessive lists of safe strings.
Comment #83
manuel garcia commentedThanks @Cottser for the heads up on #2295823: Ensure that we don't store excessive lists of safe strings.
Just for future reference when we come back to this one, before re-benchmarking:
Comment #84
davidhernandezAfter a recent conference call on the SafeMarkup issues, we might be able to get this in. It seems there have been a number of caching related improvements in the last couple of months that might pave the way. Since the likelihood of non-cached content been delivered from Views has been reduced, the performance regression we're seeing may be more tolerable.
It was discussed during the conference call, because using the template would help with the SafeMarkup issues as well DX/TX.
We would still need to get #2363423: views-view-fields.html.twig gets escaped done first, but if that happens, we can move towards getting this one in.
Comment #85
davidhernandezComment #86
davidhernandezThe escaping issue was just committed, so we can move on this one. I'm sure the patch will need some redoing/rerolling, and we should agree on some profiling scenarios.
Comment #87
stefan.r commentedComment #88
star-szrComment #89
l0keComment #90
l0keReroll of #76.
Comment #91
andypostwrong indent
Still one usage in comments:
Comment #92
l0keFixed #91.1 and #91.2
Comment #93
andypostlooks good to go, would be great to profile that again
Comment #94
dawehnerComment #95
mikeker commentedConfig:
drush si standard -y --account-pass=adminfollowed bydrush generate-users 5 && drush generate-terms tags 10 && drush generate-content 50Scenario one: default Frontpage view:
Scenario two: more complicated Frontpage view based on Joel's export:
Comment #96
andypostso there's regression 1.7 and 2.9 % - is there a way to optimize that?
Comment #97
davidhernandezI think we'd be totally ok with a 2.9% regression, but those numbers are suspiciously low and the function calls are all exactly the same before and after. @mikeker did you have the render cache and everything disabled?
What is summary comparing? The commit ids are different from the others. It has been a while since I profiled, but I don't remember there being a third comparison.
Comment #98
rainbowarrayOn the plus side, this is a big, big improvement from the previous 11% wall time increase.
Comment #99
mikeker commented@davidhernandez, this is Ubuntu 14.04 running in a VM, XDebug disabled, using the stock settings.local.php and services.yml files (rendering caching off, Twig debugging off). Anything else I should be checking?
I'm not familiar with this issue so I can't answer the function call count question.
The summary is from Fabian's XHProf-Kit tools output. Honestly, I'm not really sure what it's comparing... Sorry, still learning profiling.
Comment #100
joelpittet@mdrummond temper your excitement, need to see if we have render caching on or off. Otherwise we are just testing whether one cached result is any better/worse than another.
Also make sure xdebug is turned off because it buggers results, and to play fair turn off the twig php C extension off.
The tip off is usually the will be a function call change is 0 in the above results(usually twig calling escaping related calls on each printed value). @see the ct value is 0 on each branch.
Comment #101
joelpittet@mikeker it sounds like you got all the things right on the first go. It could be ct 0. I'll do one and try to compare.
Comment #102
davidhernandezMaybe the actual drupal cache is still on? It's on by default.
Comment #103
mikeker commentedI'm not sure how to turn off/on the Twig C extension... But I would like to know so I can speed up my non-profiled D8 sites! :P
I have the following in my settings.php
And the following in my settings.local.php (should be a copy/paste of what's in example.settings.local.php):
From the CLI:
php -m | grep -i xdebugreturns NULL.php -i | grep -i xhprofreturns:php -i | grep -i enable_clireturns:Man, there's a lot places we can cache things! Anywhere else I should be checking?
Comment #104
joelpittetTurning on twig c extension on OSX is simply
brew install php55-twigProfiling is slow to begin with you don't need to turn off CSS/JS aggregation;) And I'd put opcache on, but that is just me:)
The internet is basically a bunch of caches. router cache, browser cache, render cache, static cache, apache cache, mysql cache... you get the point:)
Comment #105
davidhernandezThe only thing I can think of is turn off the internal page cache module (but nulling the bin should stop page caching,) or maybe the branch you made doesn't actually have the patch committed? Hrmm. :/
Option three is Joel will figure it out. Option four is everything is awesome, RTBC! but the function count definitely doesn't make sense.
Comment #106
joelpittet@mikeker one problem with "default Frontpage view" is that it doesn't use fields, it's rendered content.
To find out I just turn on twig debug temporarily to confirm the template is being used (search source code for views-view-fields)
Comment #107
joelpittetUsing @mikeker's setup in #95 but only doing 2 because of what I said in #106
With Twig C extension
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=55f235cac18ad&...
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=55f235cac18ad&...
~1ms faster even but confirmed the functions calls didn't change.
Without Twig C Extension
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=55f237e5dec64&...
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=55f237e5dec64&...
Still no function call change still only 1.5% regression or 1.3ms
Comment #108
joelpittetI don't trust my results, I need a way to test that render cache is truely disabled. Also without twig extension I'm getting faster results:S
Comment #109
davidhernandezIs there something else going on that we don't understand? Something maybe that changed in core recently with all the caching/performance changes. Do we need Wim or effulgentsia to make sense of this? I remember on the SafeMarkup hangout Alex saying he'd expect this to be much faster, but I don't remember why.
Comment #110
joelpittetI think I found out what is wrong. I put a breakpoint on
RenderCache::get()and watched the bin's go by. Most are 'render', but one caught my eye. 'dynamic_page_cache'.This is very new! also previously named 'smart cache' if people were following. #2429617: Make D8 2x as fast: Dynamic Page Cache: context-dependent page caching (for *all* users!).
Was wondering why we were getting 80-110ms render times, that would be cool if it's true:)
Getting 625ms render times. Redoing the tests above in #107
Edit: Solution is to add this to your settings.local.php
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';Comment #111
joelpittet@davidhernandez they were saying it was faster because views rows or fields were cached individually. But killing render cache should negate that but still worth a test.
Comment #112
joelpittetDynamic Page Cache off (FYI it's in the latest example.settings.local.php under the other null cache bin). No need for Wim or effulgentsia.
The thing to note as I mentioned before now the Function calls (ct) are different, which means it's testing different things!
With Twig C extension
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=55f2450b58930&...
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=55f2450b58930&...
1.3-1.7% or ~7.5-9ms wall time difference.
Without Twig C extension
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=55f2501d384a2&...
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=55f2501d384a2&...
4.5-6% or ~25-33ms wall time difference.
Edit: FYI I was having variances of up to 3.5% depending on the run (did about 4-6 runs)
Comment #113
mikeker commentedWow! Nice sleuthing, @joelpittet! I'll give that a try in the morning...
Comment #114
lauriiiI think this is ready to be reviewed by a commiter. I looked at the profiling and they looked somehow sane. There is slight regression in the performance but Views is doing quite well on caching. Also this has huge improvement to the TX which makes me think its a good trade off.
Comment #115
dawehnerI try to play the devil's advocate ... we optimize DX for core for performance on most sites?
You can already override it without any problems, so we could also just expand the documentation on
theme_views_view_fields()to say: never ever override it,use that template instead.
Comment #116
fabianx commented+1 to RTBC, I think it is worth the performance tradeoff to have 100% consistency on Twig. Also I can confirm that getAttribute() with twig extension is way faster and hence for sites that can't do any of our numerous caching ways (edge case / seldom), I think it is fine to:
- either install the twig extension
- or re-instantiate theme_views_view_fields in some form (if really really really needed)
Thanks,
Fabian
Comment #117
davidhernandezOption 3 it is! joel++
Yeah, a 5% regression seems tame compared to where we started, and many hoops had to be jumped through, including disabling the smart cache, just to see it.
Comment #118
mikeker commentedI reran my second scenario (as @joelpittet points out the first one doesn't really test the patch) and got somewhat similar results to #112 without the C extension though my wall time increase was greater.
To sum up: @joelpittet saw an 11.5% increase in function calls resulting in a 4.5 - 6% increase in wall time. I'm seeing a 10.3% increase in function calls resulting in a 7.5 - 7.9% increase in wall time. This ran with n == 250 (rather than the default 100) in hopes of smoothing out any random spikes and decreasing the variation.
To recap the scenario I used so folks don't have to go searching through comments if they want to double-check these results:
Comment #119
joelpittetThanks for posting your results @mikeker!
Comment #120
joelpittetComment #123
lauriiiRandom fail
Comment #124
catchWe've committed to getting rid of theme functions, so will need to take the regression in raw rendering here.
Not committing yet just because I only skimmed the patch, although looked fine in principle.
Comment #126
catchI messed up the attribution a bit, but committed/pushed to 8.0.x, thanks!
Comment #127
davidhernandezThanks, Catch!
I feel like this unblocks something but I can't remember what.
Comment #128
catchIt might be the last non-admin theme function?
Comment #129
manuel garcia commentedThis just made my day, thanks!!