Home › Forums › General Issues › Slow update with field heavy page
Some of the pages on my website feature 200+ fields. When editing the page, ive noticed long slowdowns when I press update. If I dont change anything and press update, the response is much quicker. However, if I change the value of a single field and press update, the delay is far longer.
My question is, does ACF update all the fields on the page even if just a single value is changed? It feels like that’s what is happening. The difference between no changes and a single change is huge. Whereas there is no significant difference in delay between changing a single field, or changing lots of fields on the page.
Is there any way to optimize the process? I can understand there being a delay if ive updated 20 fields at once, but it seems excessive when im only making small tweaks to single fields.
Thanks
I don’t know this to be a fact, but I’m assuming that there is something built into ACF that does a simple “has something changes or not” test. If nothing has been changed in an ACF field then the data is just sent.
If something has been changed then the JavaScript needs to look at every field, is it a required field? If it is, does the field have conditional logic that may have it hidden and then not require.
You can also create custom filters for what is allowed input in every field and I’m pretty sure this means that checking the data requires an AJAX call so that custom filters can be run and errors returned, so the larger the number of fields the more data that needs to be sent and returned during the request.
The answer to your question is that, all of the data is updated, but that’s not what’s slowing it down. Unfortunately I think this is just a side effect of the way that the work needs to get done.
Thanks for the input! π
I did notice that tucking some of the fields away under conditional logic certainly helped with the update time. Im guessing this is because fields currently hidden behind conditionals wont save any data when update is pressed.
This leads me to believe its possible to streamline the update process. Basically, only fields that have been changed should be updated instead of each and every field. Would it not be possible to flag only the fields that have new data and only update those fields when update is pressed? Essentially treating any un-changed fields as if they we’re hidden by conditionals? I think this would speed up the update process, seeing as hiding all my fields ( except the one ive changed ) behind conditionals seems to speed up the update considerably.
You must be logged in to reply to this topic.
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!
βEver wondered when and why ACF uses JSON instead of the database? Check out our summary of the most recent session of ACF Chat Friday for the answer, and make sure to register for the next session.
— Advanced Custom Fields (@wp_acf) February 23, 2023
π https://t.co/3UtvQbDwNmhttps://t.co/wfFEVcXVKc
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.