Home Forums Backend Issues (wp-admin) Best practices for better performance


Best practices for better performance

  • Using ACF sometimes I found myself building panels with dozens of fields, repeaters and a lot of conditional logic: in this scenario the back-end becomes sluggish, slow and every time you scroll your browsers seem to die a little bit. For example, recently I’ve built a repeater field, each row containing 1 URL and 1 Text field: after 30 rows the repeater became slow, past 50 it was barely usable. Once I replaced the URL field in favor of a text field had a huge impact on the performance.

    This is just one example, but now I wonder what I may be doing wrong, and how I could improve the overall performance avoiding using field x in scenario y. Do you have any tips based on your experience? And/or is there a way to precisely measure precisely how draining can a script/check/field be in a specific scenario (apart from looking at the backend and see if something just “feels” more smooth or sluggish on your browser)?

  • Hi @foyle

    Thanks for the post.

    The plugin author intends to add pagination in a future update but we are yet to have a timeline on this. For now the best practice would be to simplify the data structure and make use of CPT to ensure that the data is not on a single page.

    I hope this helps.

  • What I did was use the tabs feature. If you have a ton of fields, by putting tab field then all of the fields go under a tab. add another tab and more fields go under the next tab. So I have a tab for ‘Options’ ‘Advanced Options’ Main Content etc. For my first tab I have something simple like Label. Having the first one be simple it makes like 100 fields look like 1 neatly organized in 6 horizontal tabs.

  • I use tabs a lot too, and I was thinking that we could take advantage of them to load assets (scripts, field images etc) in a smarter way. For example, when the post edit screen opens, it would only load the js and images of the fields that exist under the first tab. If the other tabs contain fields with extra scripts and images (for example Google Maps), then it would load them only when you click on the specific tabs.

    If the same could be done with db queries it would be perfect, but I imagine that this would be tricky. Scripts and images, on the other hand, sounds more feasible.

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

The topic ‘Best practices for better performance’ is closed to new replies.