Tuesday 02 December 2003 1:06:27 pm
I have some attributes of a class that are displayed multiple times on a page, for example I have a price that is written in at least three different spots on the page. Does eZ publish hit the database for each of these, or are they already set? If they are already set, is there any overhead to calling them repeatedly via a call like {attribute_view_gui attribute=$content_version.data_map.item_1_price} ? At this point I am playing with the idea of pulling the price once and setting it in a variable for the entire page as I believe that should cut down on calls to MySQL, but I want to ensure my understanding is correct. So, it boils down to this question: Do I gain any performance improvements by setting 'price1=$node.data_map.item_1_price.data_float' once at the top of the template and then using {$price1} to display the price compared with {attribute_view_gui attribute=$content_version.data_map.item_1_price}? Any help would be greatly appreciated! Alex [Edited after first posting]
Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]
<i>When in doubt, clear the cache.</i>
|