Jump to content

FRONTOFFICE SLOW - The Solution


joaocoelho

Recommended Posts

Hi guys,

I'm using a fresh installation of PS 1.6.1.1.

 

I run on my store PRESTASPEED and i saw a better loading but it's not enought.

 

On CATEGORY PAGES i have after debug:

Load Time	4099 ms - You'd better run your shop on a toaster
Querying Time	259 ms
Queries	405
Memory Peak Usage	21.4 Mb
Included Files	242 files - 4.29 Mb
PrestaShop Cache	- Mb
Global vars	0.51 Mb

PrestaShop Version	1.6.1.1
PHP Version	5.4.40 (OK)
MySQL Version	5.5.42-cll (Consider upgrading)
Memory Limit	256M
Max Execution Time	0s
Smarty Cache	enabled
Smarty Compilation	never recompile

	Time	Cumulated Time	Memory Usage	Memory Peak Usage
config 	204 ms 	204 ms 	6.17 Mb 	6.23 Mb
__construct 	0 ms 	204 ms 	- Mb 	6.23 Mb
init 	67 ms 	271 ms 	2.32 Mb 	8.51 Mb
checkAccess 	0 ms 	271 ms 	- Mb 	8.51 Mb
setMedia 	7 ms 	278 ms 	0.20 Mb 	8.71 Mb
postProcess 	0 ms 	278 ms 	- Mb 	8.71 Mb
initHeader 	0 ms 	278 ms 	- Mb 	8.71 Mb
initContent 	2227 ms 	2505 ms 	10.22 Mb 	19.03 Mb
initFooter 	94 ms 	2600 ms 	0.10 Mb 	19.15 Mb
display 	1499 ms 	4099 ms 	1.45 Mb 	21.43 Mb

Hook 	Time 	Memory Usage
__construct 	160 ms 	6.00 Mb
hookactionProductListModifier 	80 ms 	1.00 Mb
hookdisplayProductListFunctionalButtons 	60 ms 	0.25 Mb
hooktop 	30 ms 	0.25 Mb
hookdisplayNav 	10 ms 	- Mb
hookleftcolumn 	10 ms 	- Mb
hookdisplayFooterbottom 	10 ms 	- Mb
hookdisplayProductListSwap 	10 ms 	- Mb
hookdisplayMainmenu 	- ms 	- Mb
hookdisplayFootertop 	- ms 	- Mb
hookfooter 	- ms 	- Mb
hookdisplayTop 	- ms 	- Mb
hookDisplayOverrideTemplate 	- ms 	- Mb
hookdisplayHeader 	- ms 	- Mb
hookHeader 	- ms 	- Mb
hookdisplayFooter 	- ms 	- Mb
16 hooks 	370 ms 	7.50 Mb

Module 	Time 	Memory Usage
ptsthemepanel 	100 ms 	1.25 Mb
blockwishlist 	80 ms 	0.50 Mb
blockmanufacturer 	20 ms 	0.25 Mb
ptsstaticcontent 	20 ms 	0.25 Mb
prestaspeed 	20 ms 	0.75 Mb
blockcart 	20 ms 	0.25 Mb
multibanco 	10 ms 	0.25 Mb
ptsmegamenu 	10 ms 	0.25 Mb
sendtoafriend 	10 ms 	- Mb
sociallogin 	10 ms 	0.25 Mb
productpaymentlogos 	10 ms 	- Mb
tfextracategorytabs 	10 ms 	0.50 Mb
mailalerts 	10 ms 	0.25 Mb
blockspecials 	10 ms 	- Mb
blocklanguages 	10 ms 	- Mb
blocknewsletter 	10 ms 	0.25 Mb
blockcurrencies 	10 ms 	- Mb
blockfacebook 	- ms 	- Mb
newsletterpopupli 	- ms 	0.25 Mb
ptsblocksearch 	- ms 	0.25 Mb
sekeywords 	- ms 	0.25 Mb
blocksocial 	- ms 	- Mb
blockcategories 	- ms 	0.25 Mb
blockcontact 	- ms 	- Mb
blockmyaccountfooter 	- ms 	- Mb
blockuserinfo 	- ms 	0.25 Mb
socialsharing 	- ms 	0.50 Mb
blockmyaccount 	- ms 	- Mb
blockcontactinfos 	- ms 	- Mb
blockpaymentlogo 	- ms 	- Mb
ptsblockrelatedproducts 	- ms 	0.25 Mb
blockcms 	- ms 	0.50 Mb
32 modules 	370 ms 	7.50 Mb

Stopwatch SQL - 405 queries

SELECT SQL_NO_CACHE p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) AS quantity, IFNULL(product_attribute_shop.id_product_attribute, 0) AS id_product_attribute,
product_attribute_shop.minimal_quantity AS product_attribute_minimal_quantity, pl.`description`, pl.`description_short`, pl.`available_now`,
pl.`available_later`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, image_shop.`id_image` id_image,
il.`legend` as legend, m.`name` AS manufacturer_name, cl.`name` AS category_default,
DATEDIFF(product_shop.`date_add`, DATE_SUB("2015-09-07 00:00:00",
INTERVAL 299999 DAY)) > 0 AS new, product_shop.price AS orderprice
FROM `ps_category_product` cp
LEFT JOIN `ps_product` p
ON p.`id_product` = cp.`id_product`
INNER JOIN ps_product_shop product_shop
ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) LEFT JOIN `ps_product_attribute_shop` product_attribute_shop
ON (p.`id_product` = product_attribute_shop.`id_product` AND product_attribute_shop.`default_on` = 1 AND product_attribute_shop.id_shop=1)
LEFT JOIN ps_stock_available stock
ON (stock.id_product = p.id_product AND stock.id_product_attribute = 0 AND stock.id_shop = 1  AND stock.id_shop_group = 0  )
LEFT JOIN `ps_category_lang` cl
ON (product_shop.`id_category_default` = cl.`id_category`
AND cl.`id_lang` = 2 AND cl.id_shop = 1 )
LEFT JOIN `ps_product_lang` pl
ON (p.`id_product` = pl.`id_product`
AND pl.`id_lang` = 2 AND pl.id_shop = 1 )
LEFT JOIN `ps_image_shop` image_shop
ON (image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop=1)
LEFT JOIN `ps_image_lang` il
ON (image_shop.`id_image` = il.`id_image`
AND il.`id_lang` = 2)
LEFT JOIN `ps_manufacturer` m
ON m.`id_manufacturer` = p.`id_manufacturer`
WHERE product_shop.`id_shop` = 1
AND cp.`id_category` = 4 AND product_shop.`active` = 1 AND product_shop.`visibility` IN ("both", "catalog") GROUP BY cp.id_product ORDER BY p.`date_add` DESC
LIMIT 0,24

TIME: 140.2 MS (/classes/Category.php:782 )

SELECT SQL_NO_CACHE COUNT(cp.`id_product`) AS total
FROM `ps_product` p
INNER JOIN ps_product_shop product_shop
ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1)
LEFT JOIN `ps_category_product` cp ON p.`id_product` = cp.`id_product`
WHERE cp.`id_category` = 4 AND product_shop.`visibility` IN ("both", "catalog") AND product_shop.`active` = 1 LIMIT 1

TIME: 17.7 MS (/classes/Category.php:710 )

SELECT SQL_NO_CACHE c.`name`, cl.`id_lang`, IF(cl.`id_lang` IS NULL, c.`value`, cl.`value`) AS value, c.id_shop_group, c.id_shop
FROM `ps_configuration` c
LEFT JOIN `ps_configuration_lang` cl ON (c.`id_configuration` = cl.`id_configuration`)

TIME: 5.9 MS (/classes//classes/Configuration.php:148 )

the other queries are better

Do you have any suggestions?

Link to comment
Share on other sites

As you will see the grate bottle-necks are coming from your non native modules: ptsthemepanel, ptsstaticcontent and some foreign hooks (hookactionProductListModifier, hookdisplayProductListFunctionalButtons) probably originate from or not native theme or non native modules. You should debug or discard them.

Link to comment
Share on other sites

  • 5 months later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...