Jump to content

chargement trop long de la page d'accueil


Recommended Posts

c'est mon premier site, je l'ai monté avec Prestashop 1.5.6.2

 

Le lien : ITP-PRO

 

Depuis quelques jours le chargement de la page d'accueil est devenue plus lente, je n'ai pourtant rien changé !!!

 

PageSpeed me dit 3s3 je ne l'avais pas testé avant mais ça chargeait rapidement, plus vite qu'aujourd'hui.

 

J'ai opté pour un pack 1&1 (Unlimited Plus)
1&1 me dit que tout est OK chez eux.

 

GT Metrix me dit (mais je ne comprends pas ce que je dois faire et je ne suis pas sûr que s'en soit la cause) :

Si quelqu'un peut me venir en aide, je vous en remercie par avance.

Link to comment
Share on other sites

GT Metrix me dit (mais je ne comprends pas ce que je dois faire et je ne suis pas sûr que s'en soit la cause) :

Si quelqu'un peut me venir en aide, je vous en remercie par avance.

GTMetrix vous suggère d'activer la compression zip sur votre serveur. A voir avec votre hébergeur (peut-être une option à configurer).

Link to comment
Share on other sites

Merci pour votre réponse, apparemment c'est très compliqué d'activer gzip sur 1&1 mutalisé !

J'ai fouillé sur le net et essayé plusieurs méthodes mais à chaque fois mon site ne fonctionnait plus correctement, je crois que je suis obligé d'abandonner cette compression.

 

Est-ce la cause du temps de chargement (trop long) de la page d'accueil?

 

http://www.itp-pro.com/

Link to comment
Share on other sites

Le téléchargement du javascript prend 2s et retarde l'affichage de beaucoup d'éléments, idem pour le css... Bizarre qu'un hébergeur ne propose pas cette compression par défaut! Bon, sur la 2ème page le cache du navigateur corrige et c'est mieux.

Sinon la page HTML arrive entre 3 et 12 secondes parfois, c'est long il faudrait activer le profiling (/config/defines.inc.php) pour vérifier où se situe le problème.

Link to comment
Share on other sites

Merci pour votre réponse, j'ai activé le profiling et me suis aperçu que j'avais des modules dans la colonne de droite alors que je n'ai pas de colonne droite sur le site. J'ai donc résolu ce problème.  mais la page d'accueil est toujours aussi longue, voir plus!!!

 

j'ai maintenant ces infos dans le profiling (je n'ai mis que le début) : qu'en pensez vous?

 

Load time: 5.289s
You'd better run your shop on a toaster

  • config: 1.539s
  • constructor: 0ms
  • init: 119ms
  • checkAccess: 0ms
  • setMedia: 2ms
  • postProcess: 0ms
  • initHeader: 0ms
  • initContent: 3.244s
  • initFooter: 328ms
  • display: 58ms

Hook processing: 3.602s / 6.73 Mb

  • displayHome: 2.675s / 1.18 Mb
  • displayLeftColumn: 421ms / 0.88 Mb
  • displayFooter: 328ms / 0.38 Mb
  • displayHeader: 84ms / 2.67 Mb
  • displayTop: 63ms / 1.41 Mb
  • moduleRoutes: 31ms / 0.2 Mb
  • DisplayOverrideTemplate: 0ms / 0 Mb
  • actionFrontControllerSetMedia: 0ms / 0 Mb
  • displayRightColumn: 0ms / 0 Mb
  • actionDispatcher: 0ms / 0 Mb

Memory peak usage: 12.1 Mb

  • config: 3.4 Mb (3.5 Mb)
  • constructor: 0 Mb (3.5 Mb)
  • init: 1.53 Mb (5 Mb)
  • checkAccess: 0 Mb (5 Mb)
  • setMedia: 0.09 Mb (5 Mb)
  • postProcess: 0 Mb (5 Mb)
  • initHeader: 0 Mb (5 Mb)
  • initContent: 6.15 Mb (11.3 Mb)
  • initFooter: 0.39 Mb (11.7 Mb)
  • display: 0.12 Mb (12.1 Mb)


Total cache size (in Cache class): 0 Mb

DB type: DbPDO
SQL Queries: 274 queries

Time spent querying: 4.937s

Included files: 205
Size of included files: 2.26 Mb

Globals (> 1 Ko only): 354 Ko

Link to comment
Share on other sites

En fait je vois bien que des requêtes SQL sont lentes mais je ne sais pas comment intervenir dessus !

 

Voici les plus lentes :

 

1351.764 ms SELECT SQL_NO_CACHE s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main FROM ps_shop_url su LEFT JOIN ps_shop s ON (s.id_shop = su.id_shop) WHERE (su.domain = 'www.itp-pro.com' OR su.domain_ssl = 'www.itp-pro.com') AND s.active = 1 AND s.deleted = 0 ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC
in /homepages/31/d506736782/htdocs/classes/shop/Shop.php:320
USING FILESORT
- 1 row browsed

262.885 ms SELECT SQL_NO_CACHE *, ( IF ('2014-03-10 13:22:45' >= `from` AND '2014-03-10 13:22:45' <= `to`, 1, 0) + IF (`id_group` = 3, 2, 0) + IF (`id_country` = 8, 4, 0) + IF (`id_currency` = 1, 8, 0) + IF (`id_shop` = 1, 16, 0) + IF (`id_customer` = 2, 32, 0)) AS `score` FROM `ps_specific_price` WHERE `id_product` IN (0, 52) AND `id_product_attribute` IN (0, 0) AND `id_shop` IN (0, 1) AND `id_currency` IN (0, 1) AND `id_country` IN (0, 8) AND `id_group` IN (0, 3) AND `id_customer` IN (0, 2) AND ( (`from` = '0000-00-00 00:00:00' OR '2014-03-10 13:22:45' >= `from`) AND (`to` = '0000-00-00 00:00:00' OR '2014-03-10 13:22:45' <= `to`) ) AND id_cart IN (0, 0) AND IF(`from_quantity` > 1, `from_quantity`, 0) <= IF(id_product_attribute=0,0 ,1) ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC LIMIT 1
in /homepages/31/d506736782/htdocs/classes/SpecificPrice.php:243
USING FILESORT
- 1 row browsed

223.926 ms SELECT SQL_NO_CACHE * FROM `ps_product` a LEFT JOIN `ps_product_lang` `b` ON a.id_product = b.id_product AND b.id_lang = 1 LEFT JOIN `ps_product_shop` `c` ON a.id_product = c.id_product AND c.id_shop = 1 WHERE (a.id_product = 20) AND (b.id_shop = 1) LIMIT 1
in /homepages/31/d506736782/htdocs/classes/ObjectModel.php:212
1 row browsed

218.868 ms SELECT SQL_NO_CACHE MAX(image_shop.id_image) id_image, p.id_product, il.legend, product_shop.active, pl.name, pl.description_short, pl.link_rewrite, cl.link_rewrite AS category_rewrite 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_product_lang pl ON (pl.id_product = p.id_product AND pl.id_shop = 1 ) LEFT JOIN ps_image i ON (i.id_product = p.id_product) LEFT JOIN ps_image_shop image_shop ON (image_shop.id_image = i.id_image AND image_shop.id_shop = 1 AND image_shop.cover=1) LEFT JOIN ps_image_lang il ON (il.id_image = image_shop.id_image) LEFT JOIN ps_category_lang cl ON (cl.id_category = product_shop.id_category_default AND cl.id_shop = 1 ) WHERE p.id_product IN (46,33) AND pl.id_lang = 1 AND cl.id_lang = 1 GROUP BY product_shop.id_product
in /homepages/31/d506736782/htdocs/modules/blockviewed/blockviewed.php:124
USING FILESORT
- 2 rows browsed

214.346 ms SELECT SQL_NO_CACHE pa.id_product_attribute FROM ps_product_attribute pa INNER JOIN ps_product_attribute_shop product_attribute_shop ON (product_attribute_shop.id_product_attribute = pa.id_product_attribute AND product_attribute_shop.id_shop = 1) WHERE product_attribute_shop.default_on = 1 AND pa.id_product = 38 LIMIT 1
in /homepages/31/d506736782/htdocs/classes/Product.php:642
1 row browsed

213.693 ms SELECT SQL_NO_CACHE product_shop.`price`, product_shop.`ecotax`, product_attribute_shop.id_product_attribute, product_attribute_shop.`price` AS attribute_price, product_attribute_shop.default_on 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_product_attribute` `pa` ON pa.`id_product` = p.`id_product` LEFT JOIN `ps_product_attribute_shop` `product_attribute_shop` ON (product_attribute_shop.id_product_attribute = pa.id_product_attribute AND product_attribute_shop.id_shop = 1) WHERE (p.`id_product` = 10)
in /homepages/31/d506736782/htdocs/classes/Product.php:2673
1 row browsed

211.596 ms SELECT SQL_NO_CACHE pa.id_product_attribute FROM ps_product_attribute pa INNER JOIN ps_product_attribute_shop product_attribute_shop ON (product_attribute_shop.id_product_attribute = pa.id_product_attribute AND product_attribute_shop.id_shop = 1) WHERE pa.id_product = 10 LIMIT 1
in /homepages/31/d506736782/htdocs/classes/Product.php:652
1 row browsed

180.169 ms UPDATE `ps_page_viewed` SET `counter` = `counter` + 1 WHERE `id_date_range` = 44 AND `id_page` = 1 AND `id_shop` = 1
in /homepages/31/d506736782/htdocs/classes/Page.php:116

147.919 ms SELECT SQL_NO_CACHE `id_image_type`, `name`, `width`, `height`, `products`, `categories`, `manufacturers`, `suppliers`, `scenes` FROM `ps_image_type` WHERE `name` LIKE 'home_itpro' LIMIT 1
in /homepages/31/d506736782/htdocs/classes/ImageType.php:141
1 row browsed

95.711 ms INSERT IGNORE INTO `ps_connections_page` (`id_connections`, `id_page`, `time_start`) VALUES ('6502', '1', '2014-03-10 13:22:47')
in /homepages/31/d506736782/htdocs/classes/Connection.php:100

28.735 ms SELECT SQL_NO_CACHE p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, MAX(product_attribute_shop.id_product_attribute) 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`, MAX(image_shop.`id_image`) id_image, il.`legend`, m.`name` AS manufacturer_name, cl.`name` AS category_default, DATEDIFF(product_shop.`date_add`, DATE_SUB(NOW(), INTERVAL 20 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` pa ON (p.`id_product` = pa.`id_product`) LEFT JOIN ps_product_attribute_shop product_attribute_shop ON (product_attribute_shop.id_product_attribute = pa.id_product_attribute AND product_attribute_shop.id_shop = 1 AND product_attribute_shop.`default_on` = 1) LEFT JOIN ps_stock_available stock ON (stock.id_product = p.id_product AND stock.id_product_attribute = IFNULL(`product_attribute_shop`.id_product_attribute, 0) AND stock.id_shop = 1 ) LEFT JOIN `ps_category_lang` cl ON (product_shop.`id_category_default` = cl.`id_category` AND cl.`id_lang` = 1 AND cl.id_shop = 1 ) LEFT JOIN `ps_product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = 1 AND pl.id_shop = 1 ) LEFT JOIN `ps_image` i ON (i.`id_product` = p.`id_product`) LEFT JOIN ps_image_shop image_shop ON (image_shop.id_image = i.id_image AND image_shop.id_shop = 1 AND image_shop.cover=1) LEFT JOIN `ps_image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = 1) LEFT JOIN `ps_manufacturer` m ON m.`id_manufacturer` = p.`id_manufacturer` WHERE product_shop.`id_shop` = 1 AND cp.`id_category` = 2 AND product_shop.`active` = 1 AND product_shop.`visibility` IN ("both", "catalog") GROUP BY product_shop.id_product ORDER BY RAND() LIMIT 0, 16
in /homepages/31/d506736782/htdocs/classes/Category.php:659
USING FILESORT
- 118 rows browsed

25.848 ms 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)
in /homepages/31/d506736782/htdocs/classes/Configuration.php:116
499 rows browsed

19.614 ms SELECT SQL_NO_CACHE h.id_hook, h.name as h_name, title, description, h.position, live_edit, hm.position as hm_position, m.id_module, m.name, active FROM `ps_hook` h INNER JOIN `ps_hook_module` hm ON (h.id_hook = hm.id_hook AND hm.id_shop = 1) INNER JOIN `ps_module` as m ON (m.id_module = hm.id_module) ORDER BY hm.position
in /homepages/31/d506736782/htdocs/classes/Hook.php:227


 

Link to comment
Share on other sites

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...