Archived topic
Element with Polylang x10 SQL queries
12 replies · Started by Romain on June 1, 2019
Hello everyone,
Thank you for this super theme and its premium plugin that is at the top.
I use Polylang and I noticed that the number of requests on archine pages are very high 1000 requests per page or 7sec of change.
I watch with Query monitor and it's the Elements plugin that is in "cause", after disabling it I drops to 135 queries.
Could you in the near future try to optimize this? I guess I'm not the only one in this configuration.
cordially
Romain
That seems very strange. I have a similar configuration. But I didn't notice anything like that. Can you show more evidence for the problem?
I use static pages for Category Archives. Perhaps it could help.
https://docs.wpshowposts.com/article/use-static-pages-as-category-archives/
That sounds like something is broken, as Elements couldn't make that many queries if it tried.
Does the issue go away if you disable Polylang?
Hello,
Do Polylang to deactivate and active element: 600 Queries
https://1drv.ms/u/s!Aiq0yirkk82khcV8GvWvhsQDwWXM-g
Have Disable Element and Active Polyland: 130 Queries
With Element and Active Polylang: 1100 Queries
In view of the number of requests, I think the problem comes more than polylang element.
Romain
Just crazy numbers. How many published Elements do you have?
Currently about 500 published articles, the problem is not that the figure, especially the page generation time that is impacted at the level of PHP, with Element + Polylang almost 3 sec is much too long ...
500 articles, but how many Elements?
The number of elements does not change the number of requests, the increase of requests on the archives is done as soon as the functionality element is activated.
If not currently 1 asset
Romain
So having 1 Element active vs 10 makes no difference to the queries?
Are you using a Hook Element? If so, what code are you adding to it?
Hello,
Actually the number of active element does not change the number of requests.
I used a hook to display the breadcrumb of yoast. For the moment to avoid overwriting, I added the function directly the template file.
It's a shame because this plugin gave me plenty of ideas to improve the design of the website.
I just did another test, I deleted all the elements, just by activating the plugin the number of requests is impacted
Romain
There must be something corrupt in your database, as I can't replicate this at all (and no one else has ever reported a similar issue).
Can you replicate it on a fresh install/database?
I found the cause of the problem, it does not come from polylang or generatepress, but from a filter that I added to display all the cpt in the archive page.
Thanks for your help :)
Glad you found the issue :)