Closed (fixed)
Project:
Flag
Version:
7.x-3.x-dev
Component:
Flag core
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Oct 2013 at 11:11 UTC
Updated:
2 Mar 2014 at 20:40 UTC
Jump to comment: Most recent
Comments
Comment #1
joachim commentedIsn't the second assignment of $types going to clobber the static?
Comment #2
maximpodorov commentedIt's a common pattern. You can find examples in common.inc in Drupal core.
Comment #3
joachim commentedCan you give me an example where the variable gets re-assigned like that?
Comment #4
maximpodorov commentedComment #5
maximpodorov commentedThis patch is the continuation of efforts expressed in
#2049087: Add static caching to ctools_token_content_type_content_types()
(the static caching code is included in the new ctools release).
It uses the same tactics, and reduces repeating of function calls (sometimes tens of thousand t() calls per page).
So, please, accept the patch.
Comment #6
joachim commentedSorry for the delay.
Committed. Thanks for the patch and the reminder!
git commit -m "Issue #2118483 by maximpodorov: Added static caching for CTools content type plugin." --author="maximpodorov "
Comment #7
maximpodorov commentedThan you. I hope this will help to improve the performance.