Link to a page where the issue can be seen: hidden link
I expected to see:
Not, 22 duplicate queries for a simple view.
Instead, I got:
Duplicate queries.
I user Query Monitor to notify me of any major issues, and this to me seemed to be an issue. 22 duplicate queries, i'm not entirely sure the issue. But perhaps it is my 'view'. I have attached a few screenshots for you to view. Are yo able to help me speed this up, in case I have done something wrong?
Your have a View, I don't know how many posts it returns and iterates over, but for each iteration you then run a for-each loop that iterates over each occurrence of a repeating image field, and for each occurrence gets the image data twice, once to use the URL in a link, and once to output the img tag itself.
I tried to reproduce this locally but I don't see any duplicate queries on my test site, with what looks like the same content in the View Loop Output editor.
I'll need to take a look at your site to see if I can identify what's different from my test site.
I will mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.
Just a quick note to see that I looked in the internal tickets and the developers are discussing a refactoring of legacy code that is responsible for generating these queries, i.e. they are talking about a "proper" rather than a "quick" fix, which means this will receive due attention but you should expect that it may take a while.
I'm reviewing some old threads and I notice this was never resolved.
I asked in the internal ticket and the developer thinks that the issue may have resolved itself due to changes made in Types in the intervening period.
I can't test that, as I no longer have the duplicate of your site, and I no longer have access to your site.
If you have a version of this site online somewhere and can check yourself when the latest Types is installed (3.3.5), let me know if you still see the duplicate queries.