在gzip启用后Prestashop减速

时间:2016-08-02 17:57:19

标签: php performance .htaccess prestashop prestashop-1.6

我的Prestashop安装遇到了一些非常痛苦的问题。我试图在谷歌PageSpeed Insights中“获得更多积分”,并为文件启用了gzip压缩。结果是一个坏主意 - 突然TTFB增加到4-5秒,而在开始时它只有0.5-1秒。 我关闭gzip压缩并重新生成.htaccess但TTFB没有恢复正常。

我从调试中添加了一些转储。

Load Time   2547 ms - You'd better run your shop on a toaster
Querying Time   74 ms
Queries 178
Memory Peak Usage   33.1 Mb
Included Files  225 files - 3.52 Mb
PrestaShop Cache    0.01 Mb
Global vars 0.62 Mb
PrestaShop Version  1.6.1.6
PHP Version 5.6.18 (OK)
MySQL Version   5.6.27-log (OK)
Memory Limit    512M
Max Execution Time  300s
Smarty Cache    enabled
Smarty Compilation  auto

 Time   Cumulated Time  Memory Usage    Memory Peak Usage
config  201 ms  201 ms  9.08 Mb 9.22 Mb
__construct 0 ms    201 ms  - Mb    9.22 Mb
init        55 ms   256 ms  4.24 Mb 13.43 Mb
checkAccess 0 ms    256 ms  - Mb    13.43 Mb
setMedia    76 ms   332 ms  0.27 Mb 13.70 Mb
postProcess 0 ms    332 ms  - Mb    13.70 Mb
initHeader  0 ms    332 ms  0.01 Mb 13.70 Mb
initContent 1548 ms 1880 ms 16.96 Mb    30.89 Mb
initFooter  257 ms  2137 ms 1.25 Mb 32.07 Mb
display     410 ms  2547 ms 0.77 Mb 33.05 Mb


Hook                        Time    Memory Usage
__construct                 421 ms  9.50 Mb
hookHeader                  239 ms  - Mb
hooktop                     230 ms  6.75 Mb
hookfooter                  193 ms  0.25 Mb
hookdisplayHomeTabContent   169 ms  0.75 Mb
hookdisplayHomeTab          136 ms  - Mb
hookdisplayHeader           134 ms  - Mb
hookdisplayHome             87 ms   0.25 Mb
hookdisplayNav              75 ms   0.25 Mb
hookdisplayTop              38 ms   - Mb
hookhome                    36 ms   - Mb
hookdisplayTopColumn        34 ms   - Mb
hookdisplayFooter           31 ms   - Mb
13 hooks                    1823 ms 17.75 Mb

Module              Time    Memory Usage
blockcart           235 ms  6.75 Mb
homefeatured        100 ms  0.25 Mb
blocknewproducts    98 ms   0.75 Mb
blockbestsellers    91 ms   0.50 Mb
blockspecials       89 ms   - Mb
homeslider          89 ms   0.25 Mb
blocksearch         78 ms   - Mb
blockcategories     71 ms   0.25 Mb
blocktopmenu        71 ms   0.25 Mb
editorial           69 ms   0.25 Mb
blockcms            63 ms   0.25 Mb
cssmodule           61 ms   - Mb
blockfacebook       53 ms   0.25 Mb
blockcontactinfos   53 ms   - Mb
blockcontact        53 ms   0.25 Mb
blockmyaccountfooter50 ms   0.25 Mb
themeconfigurator   49 ms   0.50 Mb
blocksocial         42 ms   0.25 Mb
blockuserinfo       42 ms   - Mb
blocknewsletter     42 ms   1.75 Mb
blockcmsinfo        41 ms   0.25 Mb
blocklanguages      33 ms   0.25 Mb
ganalytics          33 ms   0.25 Mb
uecookie            20 ms   0.25 Mb
blockpaymentlogo    18 ms   - Mb
twengabid           18 ms   0.25 Mb
statsdata           18 ms   0.25 Mb
easymarketing       16 ms   0.75 Mb
blockmyaccount      16 ms   0.25 Mb
blockcurrencies     15 ms   - Mb
blocktags           15 ms   - Mb
blockviewed         15 ms   - Mb
blockstore          14 ms   - Mb
blocklayered        13 ms   1.50 Mb
socialsharing       13 ms   0.25 Mb 
productscategory    11 ms   0.25 Mb
sekeywords          10 ms   0.25 b
pagesnotfound       7 ms    0.25 Mb
38 modules          1823 ms 17.75Mb

正如您所看到的,看起来整个计算运行速度较慢。是的,我有缓存,“不编译模板”,启用CCC和memcache。我也尝试运行PHP 7.没有任何影响。商店相当小 - 只有少数产品,几张图片,很少有客户。你知道我怎么解决它吗?我很感激你的帮助。

0 个答案:

没有答案