Advanced Custom Fields

Enterprise Performance Improvements for Flexible Content (Lazy Loading / Virtual Rendering)
We are experiencing major admin-side performance limitations when using large-scale ACF Flexible Content implementations for enterprise page-builder architectures. After profiling and testing extensively, the bottleneck does not appear to be server-side. The primary issue is browser-side rendering and initialization within the ACF admin UI. Currently, Flexible Content appears to initialize and render all layouts and nested subfields immediately, even when layouts are collapsed. As the number of layouts and nested fields grows, this causes: * very large DOM trees * high browser memory usage * expensive JS execution * slow editor interactions * long admin load/render times * degraded scalability over time This becomes particularly problematic for enterprise/editor-heavy implementations where: * Flexible Content acts as a centralized component/page-builder system * layouts are intentionally reusable across multiple templates * editors require access to all layouts within a unified builder * content teams collaborate across many departments * websites evolve continuously over multiple years * new layouts/components are added regularly In these scenarios, splitting layouts across multiple templates is often not a practical architectural solution. We believe ACF would greatly benefit from performance-focused rendering improvements for Flexible Content, such as: * lazy loading flexible layouts * rendering layouts only when expanded * virtualized rendering / virtual scrolling * partial DOM rendering * deferred field initialization * async or chunked hydration * pagination/incremental loading similar to Repeater pagination * mount/unmount lifecycle handling for collapsed layouts * background field initialization * deferred React rendering strategies Even partial-loading approaches would significantly improve scalability and long-term maintainability for large ACF implementations. At the moment, all layouts appear to initialize immediately, which creates substantial performance overhead once projects reach enterprise scale. This feature would greatly improve ACF’s suitability for large-scale page builders, enterprise editorial systems, and long-term evolving websites.
1
·
under review
Add filter for picking which acf-json file is used
Currently, if you add additional paths for ACF to load json from using acf/settings/load_json , it will use the LAST found acf field group. This means, even if a field is edited via the editor, it will still use the last path, such as from a plugin. This is described in the documentation: This filter will allow plugin and theme developers to easily register field groups, post types, taxonomies, or options pages which cannot be edited by clients. I have a different use case - we are an agency and want to have some base packages as all of our sites share a similar structure but I still need to be able to add fields to suit different clients, such as adding an additional image field in some nested field group. Currently, there is no way to change the behavior of this, it always picks the last. I propose adding a filter that would enable plugin developers to choose which file should be used for a specific field group. ` // Pick the newest version, regardless of if its in the theme or plugin folder add_filter('acf/json/pick_file', function($currentFile, $newFile, $newJson, $loadPath) { // Only modify it if its the plugins path if($currentFile && $loadPath == plugin_dir_path( __FILE__ ) . 'acf-json') { $currentJson = json_decode( file_get_contents( $json_files[ $json['key'] ] ), true ); // Compare modified dates and take newest if ( $currentJson['modified'] < $json['modified'] ) { return $newFile; } else { return $currentFile; } } return $newFile; }); ` All the code to support this would be very simple in the includes/local-json.php file: ` // __construct() add_filter( 'acf/json/pick_file', array( $this, 'pick_file' ), 10, 4 ); // scan_files() line 326 $json_files[ $json['key'] ] = apply_filters( 'acf/json/pick_file', $file, $json_files[ $json['key'] ] ?? null, $json ); // Maintain current behavior public function pick_file( $currentFile, $newFile, $newJson, $path ) { return $newFile; } ` Right now, the best you can do is choose to not include the acf-folder when doing acf/settings/load_json. This is problematic though if there are multiple field groups you want to load. Being able to filter individual files would unlock a lot of possibilities. TLDR Goal: Create new theme, importing packages via composer Use acf-json from packages Make changes via editor, save to themes acf-json folder Right now, will still use the packages acf-json, despite the theme's being newer. - Would like to use the themes json file, while allowing sync from the package should we update it. Workaround: Prepend the package's acf-folder path. This means the theme will always win, but it does unfortunately break the sync feature. Even if the package is modified and newer, it doesn't show sync available.
1
·
under review