Support

Account

Home Forums General Issues Suggestions for scaling ACF Reply To: Suggestions for scaling ACF

  • I have built a plugin, it does not fix the issue, but it does keep the admin from timing out/crashing and instead shows a “this is taking longer than expected” screen. https://github.com/Hube2/acf-prevent-timeouts

    Recently I’ve been looking at the problem with searches using the standard WP search and the issue that content in custom fields is not searchable. In my case, the standard wp editor is not used at all so after the post is saved I copy all of the important ACF field values to post_content. As you can imagine, this put an even bigger load on saving a post and caused the site to crash. How I worked around this was to set a flag in options to tell me what posts need to be updated and then on the next admin page load an AJAX request is made that causes the copying to be done. The AJAX request uses a similar method to send a reply to the browser and then keep working, much like the method I use in the plugin I mentioned.

    Here’s the problem with saving all of the values to one field in the database, ACF will not be able to find those fields or values later, nor will it update some of the values correctly, for example, adding other choices in radio and checkbox fields, updating taxonomies for a post, correctly formatting map field data, the list goes on. This is the reason that building something to bypass ACF and the individual saving of field values is so difficult. Not only to you need save the values in a faster way but you also need to do all of the field maintenance stuff that ACF does that most people don’t even know is going on. Saving everything to a single field is possible, but then when it comes time for displaying those values you would need to do all the work of getting and formatting the values for the fields values yourself.

    This is definitely something that needs a solution for those of us that create large and complicated sites, but it’s something where the solution is going to be extremely complicated no matter how you decide to deal with it.