• Timo

    (@worschtebrot)


    If this plugin is activated, Ajax requests in the WordPress backend are no longer executed simultaneously, but one after the other.

    I tested this by sending Ajax requests with an artificial, server-side waiting pause (with php function sleep). First I send a request that takes 10 seconds and immediately afterwards one that only takes 1 second. Normally, the second request is successfully completed before the first and shows a duration of just over one second in the dev console. The first request is terminated after approx. 10 seconds.

    If this plugin is activated, one request is processed after the other, i.e. the second request is processed after the first has been completed. In the example, the second request takes more than 11 seconds (10 seconds of the first + 1 of the second).

    Do you have any idea why this might be? Is your plugin changing some global property of the XHR request?

    I have now deactivated the plugin because it causes enormous performance losses when working with other plugins in the admin section.

Viewing 1 replies (of 1 total)
  • Thread Starter Timo

    (@worschtebrot)

    I checked the code and found that it is due to the use of lib3() in the file inc/class-custom-sidebars.php where it is first used on line 253 or 255. This lib is starting a PHP session in inc/external/wpmu-lib/inc/class-thelib.php:107 which is causing the described behavior. If I comment out the method call self::_sess_init(); on line 240, Ajax requests are processed in parallel again.

    The described behavior happens on the admin pages of my plugins, which have nothing to do with custom sidebars. If your plugin requires a PHP session, it would be nice if it only used it on its own pages and would not initialize on other plugin’s pages.

Viewing 1 replies (of 1 total)
  • The topic ‘Ajax requests are no longer executed simultaneously if this plugin is activated’ is closed to new replies.