I am trying to:
show 1 child post by URL parameter
Link to a page where the issue can be seen:
lien caché
I expected to see:
normal page loading speed
Instead, I got:
loading one post takes 6 seconds (due to slow Queries)
It looks like these three lines are the main problem:
<span class="fist"></span><span class="text-center rezult [types field='rezult' output='raw' item='@fights-fighters.intermediary'][/types]">[types field='rezult' item='@fights-fighters.intermediary'][/types]</span>
<div class="method-single">[types field='method' item='@fights-fighters.intermediary'][/types]</div>
Querying the intermediary post type in the loop is causing the slowness. Let me run some tests to see what I can do to help speed this up. I can see your database contains over 1.2 million posts and almost 900k relationship links in the relationship table, which is fairly large. Maybe there is a better way to structure this View to lower the number of nested queries. I'll let you know what I find out.
Thank you, Christian, that you find the time to solve this problem. Yes, you are right, the problem of performance in the nesting of views... I've been wondering for a week how to simplify the structure, but I have not come to anything. I hope with your help the problem will be solved 🙂
Christian, is there any news?
Hi, there is nothing new to share at this time. My second tier team did an initial investigation and determined that more in-depth analysis is required, and I am waiting to receive the results of that analysis. I will let you know what we find out.
Hi! Is there any news? This problem slows down the development of the site ...
Sorry no, there is nothing new to share at this time. As a temporary solution, you could try adding a caching plugin, turning off infinite scroll and turning off AJAX updates.
I turned off infinite scroll and turning off AJAX. This did not improve performance. I want to clarify that there is no such problem in the admin, page loads fine (see screenshot). Maybe this will help.
Thank you for that information, I have passed it along to my 2nd tier investigation team.
After quite some time, our developers have updated this internal ticket and informed me that relationship queries have changed significantly in recent updates. If you are still experiencing considerable delays after updating and performing relationship migrations, please update this ticket with your findings and we can investigate in more detail. Thank you!
Christian, good to hear from you.
Yes, I am aware of the changes in the Toolset.
Today I have come to the ideal setup for relationships and CPT.
I found that intermediate items are less efficient than CPTs.
So I replaced M2M relationship with two O2M.
I also changed the internal architecture of the project.
Therefore, this problem is no longer relevant.
Okay thank you for following up. I will close here as no longer relevant.