Support

Account

Home Forums ACF PRO How to reduce the number of requests ?

Solving

How to reduce the number of requests ?

  • Hello,

    I have a problem, do you have a solution to reduce the number of requests coming from acf_register_block_type() ? Because the more blocks we create, the more the number of requests increases, even if I do my utmost to optimize the calls to CSS and JS files within. ACF significantly increases the TTFB and therefore it impacts the performance of a site. Do you have a solution?

    Thank you,
    Jeffrey

  • This is not really an ACF question, it is a performance question. Any way you build blocks, as I understand it, will run into the same issue when you are including many small CSS and/or JS files.

    It is better for performance if small chunks of code are inline rather than in lots of external files.

    Either that or all of your CSS should be put into one file and loaded event when it is not used. This is not good for performance either, but it’s still better than loading many small files.

    I can’t give guidance on how to do this with blocks specifically.

  • Thank you for your response, but the problem does not come from the small css or js files since these files are minified and compiled and each page has its own css and js without loading the blocks not present.

    If I summarize all the sql requests made by acf for a page in terms of performance, here is the result with the Blackfire tool:
    acf_block_render_template = 18.4%
    acf_render_block = 19.14%
    acf_meybe_get_field = 9.60%
    acf_format_value = 10.11%

    It shows that ACF consumes more than 57% of the requests just for the rendering of the blocks. So the impact is still huge.

    Example of result for acf_meybe_get_field :
    example acf_meybe_get_field

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

You must be logged in to reply to this topic.