Jump to content

Crazy amount of duplicated sql queries on product load in 1.7.6.9


Recommended Posts

Hi,

I'm upgrading my shop from 1.6 to 1.7.6.9. I'm on the last phase of the process (working locally and on a test server) and I was trying to optimize a performance issue in the loading of some products. Looking at the profiling data for those product pages I found a huge amount of repeated sql queries, which seems to be the problem.

I'll attach a few screenshot of the profiling log and the full log itself. Note that this isn't even the worst case, this loading can take up to 4 seconds, with even bigger numbers on the same queries. Now even looking at the products that seemed to load normally I found the same repetitions (in the order of tens instead of hundreds), so I'm starting to think this is a widespread problem, but I still can't understand what causes this and why it is much worst on some products.

A few notes and things I tried:

  •  deactivating non-native modules doesn't make any difference
  • i have no overrides on core Prestashop functionality
  • enabling/disabling/clearing the cache doesn't make any difference
  • when profiling any front office page I got a "malformed number" error, commenting out the inciminated line of code in the profiler php script the problem was circumvented (i think this caused us to lose the hook and module info, everything else seems fine). Doesn't seem plausible, but could this be related?
  • Note that the severity of the problem changes between products, but a super slow to load product stays slow.
  • I didn't include it in the screenshot for spacing reasons, but the profiler for ObjectModel instances shows a lot of duplicated instances of /classes/Link.php and /classes/Product.php

Being fairly new to Prestashop I'm not even sure how to approach this at this point. Can anyone help or at least give me some ideas on how to debug this?

 

Kind regards,

Andrea

product-page-loading-table-stress.png

product-page-loading-query-doubles.png

product-page-loading-performance.png

product-load-full-log.txt

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