Custom Fields
Re-Envisioned
Support General Input type image_advanced vs image

This topic contains 16 replies, has 3 voices, and was last updated by  Yard Digital 3 months ago.

  • Creator
    Topic
  • #14576
    Resolved
    Hazmi
    Participant

    Hi,

    client have post with a lot of meta data and there are multiple image_advanced fields. The backend site is too slow due the admin-ajax requests to this fields. (a lot of 500/502 errors and at the end the site crashes).

    Is there a way for this problem?

    Can be this fields simple rewrited to type “image”? Create this field “non” ajax requests?

Viewing 10 replies - 1 through 10 (of 16 total)
  • Author
    Replies
  • #14581

    Anh Tran
    Keymaster

    Hi Hazmi,

    The data for these 2 field types are the same, so you want to switch field type, it’s ok to do so.

    Besides, the ajax request is very minimal as it only queries for attachments. There’s no requests to other resources (CSS, JS). So if you see a lot of errors, I think the website should be optimized.

    #14582

    Hazmi
    Participant

    Hi,

    we have problems only in administration of website. The frontend is super fast with no problem and no errors. I read a lot of blog posts about admin-ajax that says that this file in more use cause WP very slow – that’s right.

    So what have to be optimized in backend site?

    #14606

    Hazmi
    Participant

    Hi,

    back to my question. Do field type “image” ajax request similiar as “image_advanced”? Have you tip to “unlock” backend site due a lot of admin-ajax requests on “image_advanced” fields?

    #14641

    Anh Tran
    Keymaster

    Hi Hazmi,

    The image field don’t have any ajax request. It’s a simple HTML5 file field. That probably is the reason why it’s fast.

    we have problems only in administration of website. The frontend is super fast with no problem and no errors. I read a lot of blog posts about admin-ajax that says that this file in more use cause WP very slow – that’s right.

    Interesting. That might be related to the WP backend. Probably WP doesn’t optimize the back end too much, especially if there are many plugins behave poorly on the back end.

    #14642

    Hazmi
    Participant

    Hi Anh,

    this problem is only with your plugin. There are no other plugins, that are using admin-ajax.If client have for example product site, with galleries, various products image fields … the backend is “dead” – the fields are not loaded (502 errors).

    #14643

    Anh Tran
    Keymaster

    How many image fields that start to cause the back end dead?

    And how many posts and images in the site?

    #14644

    Hazmi
    Participant

    About +- 40 images (image_advanced fields). Client site has large media library… And about 30 posts (+ 6 languages – media are not translated).

    #14665

    Anh Tran
    Keymaster

    Is that 40 fields or 40 images per field? The number of requests = the number of fields * the number of clones. All of the requests are sent at the time of loading. So that might be the bottleneck.

    Do you see the same error when you insert image to the post content the normal way?

    #14671

    Hazmi
    Participant

    There are fields (image_advanced) with multiple files support for gallery purpose.. other fields are single image_advanced. What do you mean “* the number of clones”? Yes – this is a problem. The website run over 2 year with this configuration and amount of files with no problem after now.

    There is no error, if i insert image to the post content, no errors if i’m on the post edit, where are not these image_advanced fields.

    #14675

    Anh Tran
    Keymaster

    Hi Hazmi,

    I got it. Do you know when the problem, so I can track what has changed since then?

    Also, can you check how many ajax requests when page is loaded? It’s in the Network tab in the console, filtered by XHR request type:

    View post on imgur.com

    By the way, can I have a temporary admin account to see the problem?

Viewing 10 replies - 1 through 10 (of 16 total)

You must be logged in to reply to this topic.