Admin Ajax speed + Xdebug parameter
-
Hi there Daniele, two questions;
1] When debugging some stuff on my end I noticed that DaReactions Pro is using the following;“‘ajax_url’ => admin_url(‘admin-ajax.php?XDEBUG_TRIGGER=xdebug_profile’),”
Why is that? I’ve never seen an admin ajax call use it like this.
I also dont see it being used in the plugin further. Can you tell my why this is added?
2] Also for some reason DaReactions admin-ajax seems slow compared to other ajax calls.
Other ajax calls seems to take max 1.5-2 seconds. Which is not weird when looking at the installation size / complexity etc.
DaReactions (im using shortcode, see below) seems to take between 6-8 seconds. Which is a bit on the long side.For reference I am using this in my templates;
<?php
if (is_plugin_active('da-reactions-premium/da-reactions.php')) {
global $post;
$item_type = $post->post_type;
$item_id = $post->ID;
echo do_shortcode('[reactions id="' . $item_id . '" type="' . $item_type . '"]');
}In the past for my own custom ajax functions I looked into shortinit and it’s options, my custom ajax calls take roughly 100-150ms. Shortly put at that point i have made possible user id and post id available and then could use $wpdb to do queries directly to the database, bypassing a lot of WordPress
Is there something we can do to speed up the rendering of DaReactions?
I tried the Performance for local storage but im not sure that improves the situation in my case as I am using FlyingPress/FlyingCDN for caching.Hope you can give some pointers ??
Best regards, Patrick
- You must be logged in to reply to this topic.