• Hello,

    I see on one of my sites that the admin-amax.php file take sometimes a lot of time to load.
    If I check in depth, it looks like it’s because of WP Cloudy features.

    Is there a way to optimise this ? Or not use AJAX for the plugin ?
    Is AJAX really necessary ?

    Thanks for your answers.
    Antoine

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Benjamin Denis

    (@rainbowgeek)

    Hi,

    Ajax is the best way to load data asynchronously, especially, when you request a 3rd service like Open Weather Map.

    Can you provide a link to your website?

    Thread Starter aolbrechts

    (@aolbrechts)

    It’s on http://www.gomze.be

    If I check the elements loaded, admin-ajax.php takes a long time compared to other elements (this is on the front-end web site, not the admin).

    If I click to see what’s in that file (see screenshot) I see the following code :

    {“success”:true,”data”:{“weather”:”76″,”html”:”<!– Start #wpc-weather –>\n\n\t\t<!– WP Cloudy : WordPress weather plugin v3.8.1 – https:\/\/wpcloudy.com\/ –>\n\t\t<div id=\”wpc-weather\” class=\”wpc-76 wpc-weather-801 medium \” style=\”; background-size:; background-position: % %; color:#666666;; font-family:\”>\n\t\t\n\t<!– Current weather –>\n\t<div class=\”now\”>\t\t\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td><div class=\”time_symbol climacon\” style=\”fill:#666666\”>\n\t\t<svg\n version=\”1.1\”\n id=\”cloudSun\”\n class=\”climacon climacon_cloudSun\”\n xmlns=\”http:\/\/www.w3.org\/2000\/svg\”\n xmlns:xlink=\”http:\/\/www.w3.org\/1999\/xlink\”\n x=\”0px\”\n y=\”0px\”\n viewBox=\”15 15 70 70\”\n enable-background=\”new 15 15 70 70\”\n xml:space=\”preserve\”>\n <clipPath id=\”cloudFillClip\”>\n <path\n d=\”M15,15v70h70V15H15z M59.943,61.639c-3.02,0-12.381,0-15.999,0c-6.626,0-11.998-5.371-11.998-11.998c0-6.627,5.372-11.999,11.998-11.999c5.691,0,10.434,3.974,11.665,9.29c1.252-0.81,2.733-1.291,4.334-1.291c4.418,0,8,3.582,8,8C67.943,58.057,64.361,61.639,59.943,61.639z\”\/>\n <\/clipPath>\n <clipPath id=\”sunCloudFillClip\”>\n <path\n d=\”M15,15v70h70V15H15z M57.945,49.641c-4.417,0-8-3.582-8-7.999c0-4.418,3.582-7.999,8-7.999s7.998,3.581,7.998,7.999C65.943,46.059,62.362,49.641,57.945,49.641z\”\/>\n <\/clipPath>\n <g class=\”climacon_iconWrap climacon_cloudSun-iconWrap\”>\n <g clip-path=\”url(#cloudFillClip)\”>\n <g class=\”climacon_componentWrap climacon_componentWrap-sun climacon_componentWrap-sun_cloud\” >\n <g class=\”climacon_componentWrap climacon_componentWrap_sunSpoke\”>\n <path\n class=\”climacon_component climacon_component-stroke climacon_component-stroke_sunSpoke climacon_component-stroke_sunSpoke-orth\”\n d=\”M80.029,43.611h-3.998c-1.105,0-2-0.896-2-1.999s0.895-2,2-2h3.998c1.104,0,2,0.896,2,2S81.135,43.611,80.029,43.611z\”\/>\n <path\n class=\”climacon_component climacon_component-stroke climacon_component-stroke_sunSpoke climacon_component-stroke_sunSpoke-north\”\n d=\”M72.174,30.3c-0.781,0.781-2.049,0.781-2.828,0c-0.781-0.781-0.781-2.047,0-2.828l2.828-2.828c0.779-0.781,2.047-0.781,2.828,0c0.779,0.781,0.779,2.047,0,2.828L72.174,30.3z\”\/>\n <path\n class=\”climacon_component climacon_component-stroke climacon_component-stroke_sunSpoke climacon_component-stroke_sunSpoke-north\”\n d=\”M58.033,25.614c-1.105,0-2-0.896-2-2v-3.999c0-1.104,0.895-2,2-2c1.104,0,2,0.896,2,2v3.999C60.033,24.718,59.135,25.614,58.033,25.614z\”\/>\n <path\n class=\”climacon_component climacon_component-stroke climacon_component-stroke_sunSpoke climacon_component-stroke_sunSpoke-north\”\n d=\”M43.892,30.3l-2.827-2.828c-0.781-0.781-0.781-2.047,0-2.828c0.78-0.781,2.047-0.781,2.827,0l2.827,2.828c0.781,0.781,0.781,2.047,0,2.828C45.939,31.081,44.673,31.081,43.892,30.3z\”\/>\n <path\n class=\”climacon_component climacon_component-stroke climacon_component-stroke_sunSpoke climacon_component-stroke_sunSpoke-north\”\n d=\”M42.033,41.612c0,1.104-0.896,1.999-2,1.999h-4c-1.104,0-1.998-0.896-1.998-1.999s0.896-2,1.998-2h4C41.139,39.612,42.033,40.509,42.033,41.612z\”\/>\n <path\n class=\”climacon_component climacon_component-stroke climacon_component-stroke_sunSpoke climacon_component-stroke_sunSpoke-north\”\n d=\”M43.892,52.925c0.781-0.78,2.048-0.78,2.827,0c0.781,0.78,0.781,2.047,0,2.828l-2.827,2.827c-0.78,0.781-2.047,0.781-2.827,0c-0.781-0.78-0.781-2.047,0-2.827L43.892,52.925z\”\/>\n <path\n class=\”climacon_component climacon_component-stroke climacon_component-stroke_sunSpoke climacon_component-stroke_sunSpoke-north\”\n d=\”M58.033,57.61c1.104,0,2,0.895,2,1.999v4c0,1.104-0.896,2-2,2c-1.105,0-2-0.896-2-2v-4C56.033,58.505,56.928,57.61,58.033,57.61z\”\/>\n <path\n class=\”climacon_component climacon_component-stroke climacon_component-stroke_sunSpoke climacon_component-stroke_sunSpoke-north\”\n d=\”M72.174,52.925l2.828,2.828c0.779,0.78,0.779,2.047,0,2.827c-0.781,0.781-2.049,0.781-2.828,0l-2.828-2.827c-0.781-0.781-0.781-2.048,0-2.828C70.125,52.144,71.391,52.144,72.174,52.925z\”\/>\n <\/g>\n <g class=\”climacon_wrapperComponent climacon_wrapperComponent-sunBody\” clip-path=\”url(#sunCloudFillClip)\”>\n <circle\n class=\”climacon_component climacon_component-stroke climacon_component-stroke_sunBody\”\n cx=\”58.033\”\n cy=\”41.612\”\n r=\”11.999\”\/>\n <\/g>\n <\/g>\n <\/g>\n <g class=\”climacon_wrapperComponent climacon_wrapperComponent-cloud\” clip-path=\”url(#cloudFillClip)\”>\n <path\n class=\”climacon_component climacon_component-stroke climacon_component-stroke_cloud\”\n d=\”M44.033,65.641c-8.836,0-15.999-7.162-15.999-15.998c0-8.835,7.163-15.998,15.999-15.998c6.006,0,11.233,3.312,13.969,8.203c0.664-0.113,1.338-0.205,2.033-0.205c6.627,0,11.998,5.373,11.998,12c0,6.625-5.371,11.998-11.998,11.998C57.26,65.641,47.23,65.641,44.033,65.641z\”\/>\n <\/g>\n <\/g>\n <\/svg><!– cloudSun –>\n\t<\/div><\/td>\n\t\t\t\t<td class=\”info\”><div class=\”time_temperature\”>9<\/div> Vent NNE<br \/>3,6 km\/h<\/strong><\/td>\n\t\t\t<\/tr>\n\t\t<\/table>\n\t<\/div>\t\n\t\t\n\t\t<!– Daily Forecast –>\n\t\t<div class=\”forecast\”>\t\t\t \n\t\t\t \t\t<div class=\”first\”>\n\t\t\t \t\t<div class=\”day\”>Mercredi<\/div>\n\t\t\t \t\t<div class=\”symbol climacon w500\”><\/div> \n\t\t\t \t\t<div class=\”temp_min\”>6<\/div>\n\t\t\t \t\t<div class=\”temp_max\”><span class=\”wpc-highlight\”>11<\/span><\/div>\n\t\t\t \t<\/div>\n\t\t\t \t \n\t\t\t \t\t<div class=\”second\”>\n\t\t\t \t\t<div class=\”day\”>Jeudi<\/div>\n\t\t\t \t\t<div class=\”symbol climacon w802\”><\/div> \n\t\t\t \t\t<div class=\”temp_min\”>5<\/div>\n\t\t\t \t\t<div class=\”temp_max\”><span class=\”wpc-highlight\”>11<\/span><\/div>\n\t\t\t \t<\/div>\n\t\t\t \t \n\t\t\t \t\t<div class=\”third\”>\n\t\t\t \t\t<div class=\”day\”>Vendredi<\/div>\n\t\t\t \t\t<div class=\”symbol climacon w500\”><\/div> \n\t\t\t \t\t<div class=\”temp_min\”>6<\/div>\n\t\t\t \t\t<div class=\”temp_max\”><span class=\”wpc-highlight\”>11<\/span><\/div>\n\t\t\t \t<\/div>\n\t\t\t \t\t\n\t\t<\/div>\t\t\t\n\t<!– CSS –>\n\t\t\t\n\t \t\t<style>\n\t \t#wpc-weather.small .now .time_temperature:after,\n\t \t#wpc-weather .forecast .temp_max:after,\n\t \t#wpc-weather .forecast .temp_min:after,\n\t \t#wpc-weather .hours .temperature:after,\n\t \t#wpc-weather .today .time_temperature_max:after,\n\t \t#wpc-weather .today .time_temperature_min:after,\n\t \t#wpc-weather .now .time_temperature:after,\n\t \t#wpc-weather .today .time_temperature_ave:after {\n\t\t content:\”\\e03e\”;\n\t\t font-family: \”Climacons-Font\”;\n\t\t font-size: 24px;\n\t\t margin-left: 2px;\n\t\t vertical-align: top;\n\t \t}\n\t <\/style>\n\t \t\n<!– End #wpc-weather –>\n<\/div>”}}

    Plugin Author Benjamin Denis

    (@rainbowgeek)

    It’s normal because the plugin is waiting the response from Open Weather Map, third-party service, to load datas.
    But thanks to Ajax, it doesn’t slow down your website.

    Thread Starter aolbrechts

    (@aolbrechts)

    But it does seem to use a lot of (virtual) memory, which can have an impact …

    Time: Wed Nov 2 17:28:09 2016 +0100
    Account: gomze
    Resource: Virtual Memory Size
    Exceeded: 548 > 512 (MB)
    Executable: /opt/cpanel/ea-php70/root/usr/bin/php-cgi
    Command Line: /opt/cpanel/ea-php70/root/usr/bin/php-cgi /home/gomze/public_html/wp-admin/admin-ajax.php
    PID: 14699 (Parent PID:9191)
    Killed: No

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

The topic ‘admin-ajax.php load time ?’ is closed to new replies.