Home Forums General Issues get_field performance anomaly


get_field performance anomaly

  • Everything in my setup (latest ACF, latest WP) is working fine but found a huge bottleneck and timed a single get_field call:

    $time_start = microtime(true);
    $link = get_field('case', 193);
    $time_end = microtime(true);
    $time = $time_end - $time_start;

    Where $time is approx 3seconds!

    I am dumbfounded as what can be the cause of this – the post/postmeta tables look fine, I am using ACF all over the site with no problems.

    Any clues? Directions on where to look?

  • So it turns out this was because I was using a relatively consuming task to dynamically populate a select field. I was not aware that this needed to be run when simply retrieving the value of the select field. Why is this?

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘get_field performance anomaly’ is closed to new replies.