Input type image_advanced vs image
- This topic has 16 replies, 3 voices, and was last updated 5 years, 10 months ago by
Yard Digital.
-
AuthorPosts
-
May 16, 2019 at 2:32 AM #14576
Hazmi
ParticipantHi,
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?
May 16, 2019 at 9:37 AM #14581Anh Tran
KeymasterHi 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.
May 16, 2019 at 11:29 AM #14582Hazmi
ParticipantHi,
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?
May 17, 2019 at 3:08 PM #14606Hazmi
ParticipantHi,
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?
May 20, 2019 at 3:32 PM #14641Anh Tran
KeymasterHi Hazmi,
The
image
field don't have any ajax request. It's a simple HTML5file
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.
May 20, 2019 at 4:14 PM #14642Hazmi
ParticipantHi 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).
May 20, 2019 at 4:32 PM #14643Anh Tran
KeymasterHow many image fields that start to cause the back end dead?
And how many posts and images in the site?
May 20, 2019 at 5:03 PM #14644Hazmi
ParticipantAbout +- 40 images (image_advanced fields). Client site has large media library... And about 30 posts (+ 6 languages - media are not translated).
May 22, 2019 at 9:36 AM #14665Anh Tran
KeymasterIs 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?
May 22, 2019 at 2:09 PM #14671Hazmi
ParticipantThere 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.
May 22, 2019 at 3:13 PM #14675Anh Tran
KeymasterHi 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:
https://i.imgur.com/bZbbjBX.png
By the way, can I have a temporary admin account to see the problem?
May 22, 2019 at 4:20 PM #14676Hazmi
ParticipantThere are +- 40 ajax-requests.. Yes, i can create admin account for you.
May 23, 2019 at 10:17 PM #14700May 24, 2019 at 12:27 AM #14704Hazmi
ParticipantOK, i send you a message.
June 3, 2019 at 9:21 PM #14812Yard Digital
ParticipantIs the solution to this problem fix in the newest metabox version 4.18.2?
We too experience performance issues when having multiple uploads/images in the admin editor.
-
AuthorPosts
- You must be logged in to reply to this topic.