PLEASE PROVIDE THE TEMPLATES AND/OR PHP CODE IN THE TASK DESCRIPTION (Not URL-s to them). THAT ALLOWS US TO REPRODUCE THE PROBLEM! OTHERWISE WE ARE NOT ABLE TO HELP YOU!
Remember to hide all the security-related pieces of code from the task description, like passwords, server paths etc. for your own safety. Once we close the task, we cannot edit it anymore!
FS#117 - Undecorated hooks in data formats are executed twice
Opened by Zyx (Zyx) - Wednesday, 02 September 2009, 11:45 GMT-8
Last edited by Zyx (Zyx) - Thursday, 03 September 2009, 03:23 GMT-8
If we create a data format with the following _build() method:
protected function _build($hookName)
echo $hookName.': '.$this->_getVar('item').'<br/>';
} // end _build();
we can notice that every hook is executed twice by the system which reduces the compilation performance and forces to do unnecessary double calculations of the same thing. The problem lies in the Opt_Compiler_Format::get() method which does an extra call before entering the decoration loop.
The problem has a minor severity and unless we rely on some specific side effects, it should not cause any problems in the normal use.
Thursday, 03 September 2009, 03:23 GMT-8
Reason for closing: Fixed
Additional comments about closing: Fixed in rev. 223