Home › Forums › Backend Issues (wp-admin) › JS performance issues › Reply To: JS performance issues
Hi Elliot,
I hope you don’t mind double posting but I don’t want mix questions with my findings
The acf.conditional_logic.change function has a line:
$.each(this.items, function( k, item ){
which loops through all items with conditional logic. In my case with 9 rows this.items has 255 elements and loop takes 10 seconds to complete.
Each extra row add another 10-40 items depending on the complexity of the nested repeater fields.
In the embedded code for each field you put them all in one bag:
acf.conditional_logic.items.push({
This ultimately kills the performance of conditional logic fields. I suggest you rewrite the code so the repeater field holds separate conditional_logic object with its own children only rather than refer to the global object with all items.
I’ll keep digging what is causing other slowdowns.
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.