We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Serious performance issue after upgrading to ee3

How Do I?

Panos S.'s avatar
Panos S.
58 posts
8 years ago
Panos S.'s avatar Panos S.

Hello, I recently started the process of upgrading a website running ee2 to ee3 (v.3.5.2). To do that I created a local version of the entire website and followed the upgrade instructions. After the upgrade, the site is extremely slow. Each page requires around 20 seconds to load and the amount of queries required is unbelievably high. For example, for a page that runs on ee2 and requires 177 queries, takes around 2 seconds to load whereas the ee3 version requires 3174 (!) queries and around 20 seconds to load. To be more specific I get 3174 times the following query:

SELECT Site_sites.site_id as Site__site_id, Site_sites.site_name as Site__site_name
FROM (`exp_sites` as Site_sites)
WHERE  ( 
`Site_sites`.`site_id`  =  1
) 
LIMIT 1

What is going on?

UPDATE: It looks like this has to do with template partials/variables. If I disable saving templates as files, the number of queries drops to normal. Apparently if the saving templates as files is enabled, ee tries to check every single template variable and partial’s folder even if the template is completely empty.

Is this a known bug?

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

If templates are saved as files, ExpressionEngine will indeed look on disk for a file corresponding to your templates, but this would not create a performance issue, nor would it increase any queries. Upgrading definitely would not on its own create such a massive jump queries, definitely not running that site query 3000+ times. Can you post the template code that’s generating these queries? You could also link to a zip file of the output of the page with debugging enabled so someone could look at your queries and template parsing log and quickly identify the cause.

       
Panos S.'s avatar
Panos S.
58 posts
8 years ago
Panos S.'s avatar Panos S.

Hello Derek,

Please consider this issue closed. It had to do with a piece of code in two core files that I had to comment out in order to complete an extremely problematic upgrade from ee 2 as recommended by a user on the forum that had the same problem while upgrading.

Thank you for your time and my apologies for any trouble.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.