Open GoogleCodeExporter opened 9 years ago
My statistics for the just created templates_c directory
aim-server[../templates_c]$ find . -type f|wc
91 91 9239
aim-server[../templates_c]$ grep -r tpl_vars|wc
1679 12063 400836
aim-server[../templates_c]$ grep -r echo|wc
1097 8450 282738
aim-server[../templates_c]$ grep -r is_callable|wc
129 1182 39121
aim-server[../templates_c]$ grep -rw section|wc
123 664 34069
aim-server[../templates_c]$ grep -rw foreach|wc
62 336 14058
aim-server[../templates_c]$ grep -r smarty_modifier|wc
136 2204 44611
aim-server[../templates_c]$ grep -r smarty_function|wc
168 1036 48323
aim-server[../templates_c]$ grep -r getSubTemplate|wc
259 2825 80745
Top 10 files by size
25742 Jan 15 18:10 64f660e1d9498b0761469715501a4f370ff9329b.file.buy_now.tpl.php
21884 Jan 15 18:10 7c5c7be9dabdaddd6c1ea526ea2defc15f09ad29.file.service_js.tpl.php
19341 Jan 15 18:10 3fb81a89a96a0403c9ff11ee6919a5d253740cd3.file.products_t.tpl.php
18461 Jan 15 18:10 2b3f4b3016cbcfe90b3e2fe5ed1875447bcf306e.file.home_main.tpl.php
16810 Jan 15 18:10 0a61e81c47b2a9edab979ac46161395ce54228ef.file.on_sale_icon.tpl.php
15801 Jan 15 18:10 82c8ce22612b67ea145e185938944dfbe5530f81.file.button.tpl.php
11662 Jan 15 18:10 92bf62f2aa597b80463853b3b94735e01c34f913.file.vote_bar.tpl.php
10006 Jan 15 18:10 aaabbc8566e55a33a7847b6d1301478c7ee6e049.file.language_selector.tpl.php
9961 Jan 15 18:10 17869a18dd63d947fe1f720d08b9a493598a7401.file.content.tpl.php
9574 Jan 15 18:10 5b55a39758161e8cf39d7b2fdfcad25ab6eed114.file.customer_reviews_menu.tpl.php
9197 Jan 15 18:10 36ff345031cb4f63fc4d060ffc6415593995bf56.file.service_head.tpl.php
9193 Jan 15 18:10 a0f00b8af06fc38e99ec01d1e0c6acad3d92fc97.file.survey.tpl.php
7756 Jan 15 18:10 e7aefa970327d4ba71b5b397d3b3a89f6560f200.file.spambot_arrest.tpl.php
7589 Jan 15 18:10 3ab0a6bb2fc56817bc15a00f7a9c0970a971ab48.file.left_bar.tpl.php
7462 Jan 15 18:10 5b8c6e03eff0559a83423a17fc05f570d62028b0.file.welcome.tpl.php
Original comment by a...@x-cart.com
on 15 Jan 2015 at 3:37
[deleted comment]
These variables are not used
include/lib/smarty3/sysplugins/smarty_internal_configfileparser.php:
$yymsp = $this->yystack[$this->yyidx];
include/lib/smarty3/sysplugins/smarty_internal_templateparser.php:
$yymsp = $this->yystack[$this->yyidx];
The affected method is yy_reduce() which is called 39342 times in my case.
The time cost for this bug is about 1-2% !
Original comment by a...@x-cart.com
on 16 Jan 2015 at 7:33
The same bug
Index: include/lib/smarty3/sysplugins/smarty_internal_templateparser.php
--- include/lib/smarty3/sysplugins/smarty_internal_templateparser.php
+++ include/lib/smarty3/sysplugins/smarty_internal_templateparser.php
@@ -4421,7 +4421,6 @@ class Smarty_Internal_Templateparser#line 80
"smarty_internal_templateparser.php
$this->_retvalue = $yy_lefthand_side = null;
if (isset(self::$yyReduceMap[$yyruleno]) || array_key_exists($yyruleno, self::$yyReduceMap)) {
// call the action
- $this->_retvalue = null;
$this->{'yy_r' . self::$yyReduceMap[$yyruleno]}();
$yy_lefthand_side = $this->_retvalue;
}
Original comment by a...@x-cart.com
on 16 Jan 2015 at 8:09
The attached patch
cached_yy_is_expected_token_n_other_micro.diff
includes
cached_yy_is_expected_token_n_isset_vs_array_key_exists.diff
and the changes from the last comments
Original comment by a...@x-cart.com
on 16 Jan 2015 at 9:21
Attachments:
Original issue reported on code.google.com by
a...@x-cart.com
on 15 Jan 2015 at 3:36Attachments: