Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Jan 2015 at 12:42 UTC
Updated:
11 Feb 2015 at 19:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
maximpodorov commentedComment #2
joelpittetWhat kind of savings are we looking at here @maximpodorov, I have that function coming in at about 60 times, do you have it being called more in the 1000s?
I did some preliminary research to see when drupal_fast_static becomes worth the extra code complexity and it seems to me that about 5000 calls is a nice number where it starts to make some good merit for it's use.
@see https://www.drupal.org/node/2354561#comment-9390521
I could be way off and like you know more about the subject than I do, but please share if you do:) Or how my testing is flawed.
Comment #3
joelpittetSorry 250 times, is my count not 60.
Comment #4
maximpodorov commentedIf Panelizer is used for entities, and many entities are to be shown, and every has view attached, you can get tens of thouthands ctools_get_plugins() calls. Of course, the time is not saved considerably, but, if you can reduce function calls, it's better, I think.
Comment #5
joelpittetWell cool, if you can get >5000 it seems the extra complexity is outweighed by the benefit IMO.
It would be nice to get a couple of XHProf Kit results on this one with an example, if possible. Though from what you mentioned in #4 It's likely that could get that high quickly and I have 250 calls in a much simpler case.
I'll let a committer decide if it needs profiling?
Comment #6
japerryNice little optimization. Committed.
Comment #9
damienmckennaIt was committed.