Home › Forums › ACF PRO › Performance issues with hundreds of queries › Reply To: Performance issues with hundreds of queries
A solution I have used in a similar case was to run the fields loop once and then output the HTML from the loop to an option of it’s own in the DB. Next time the page is ran if the page saved date is not newer then the option save date then the HTML is taken from the HTML option in the DB.
The data can be grabbed in the add_action(‘acf/save_post’);
This results in one call to the DB if the post has not been altered.
Hope this helps
Kieran
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.