Skip Navigation

[Résolu] admin-ajax.php affecting website loading time

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem: I see multiple calls to admin-ajax.php on my site and this seems to be increasing the time to "fully loaded" in my website performance tests.

Solution: "Fully loaded" isn't very good at determining which items are render blocking and which items are asynchronous in a waterfall view. In this case, the calls to admin-ajax.php are not render blocking and do not affect the time it takes for your site to become painted and interactive. These calls are used to help preload images and content for slider Views. You can disable preloading in the slider Views' Advanced options, but the User experience may be negatively affected.

Relevant Documentation: https://gtmetrix.com/faq.html#faq-fully-loaded-vs-onload
https://toolset.com/documentation/user-guides/creating-sliders-with-types-and-views/
https://toolset.com/documentation/user-guides/advanced-how-pagination-script-works/

This support ticket is created Il y a 6 années et 11 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Marqué : 

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par toolset-dave Il y a 6 années et 10 mois.

Assisté par: Christian Cox.

Auteur
Publications
#604707

Hi,

I found out that file admin-ajax.php cause longer loading time for my web lien caché (see Waterfall tab on lien caché). It loads 3 times. Is it neccesary or is there any error causing it?

I have copied this from Post tab of second and third admin-ajax.php load:

view_number=6294-TCPID9811&page=2&sort%5Bwpv_sort_orderby%5D=&sort%5Bwpv_sort_order%5D=&sort%5Bwpv_sort_orderby_as
%5D=&sort%5Bwpv_sort_orderby_second%5D=&sort%5Bwpv_sort_order_second%5D=&attributes%5Bid%5D=6294&environment
%5Bwpv_aux_current_post_id%5D=9811&environment%5Barchive%5D%5Btype%5D=native&environment%5Barchive%5D
%5Bname%5D=home&expect=full&action=wpv_get_view_query_results&id=6294&wpv_view_widget_id=0
view_number=6294-TCPID9811&page=18&sort%5Bwpv_sort_orderby%5D=&sort%5Bwpv_sort_order%5D=&sort%5Bwpv_sort_orderby_as
%5D=&sort%5Bwpv_sort_orderby_second%5D=&sort%5Bwpv_sort_order_second%5D=&attributes%5Bid%5D=6294&environment
%5Bwpv_aux_current_post_id%5D=9811&environment%5Barchive%5D%5Btype%5D=native&environment%5Barchive%5D
%5Bname%5D=home&expect=full&action=wpv_get_view_query_results&id=6294&wpv_view_widget_id=0
#604875

Hi, please check the documentation for this performance test, talking about the event "fully loaded" vs. "onload":
lien caché

Possible issues with using this event:
This event fires only when a page completely stops loading content, including ads and below the fold elements. Your site might have loaded fast above the fold and be usable, however since the analysis is now waiting for the entire site to stop loading data, your reported Page Load Time might be longer.

So the "fully loaded" event doesn't tell you much about the real performance of your site. The real performance test is when your page is painted and interactive.

I don't think it's an error, and these admin-ajax requests do not appear to be render-blocking. Your page is interactive and painted long before these requests are complete, so the experience for your Users isn't affected.

As a test, you could modify the settings in your View's Pagination and Slider settings "Advanced options" area to disable preloading pages and images, and check to see if the number of admin-ajax requests drops. However, I think your Users will have a better experience if you continue to use preloading. In most cases, the User experience will not be negatively effected by these admin-ajax requests. You'll get better results by optimizing your images more aggressively (JPGs instead of PNGs) and using a CDN to deliver your assets.

When we debug performance issues here, we use Query Monitor to check the time of each query. If any Toolset queries require more than 0.5ms to complete, then there could be a problem. If you find that to be the case, please let me know and I can investigate further.

#606715

Hi Christian,

thank you for the explanation. I tried to load the site with setting "Onload time" and admin-ajax is loading only once.