• Resolved Antony Booker

    (@antonynz)


    Hello,

    I’m noticing a performance hit with this plugin due to the amount of file_exists checks coming from the autoloader (social-warfare/lib/Social_Warfare.php:572 and social-warfare-pro/lib/Social_Warfare_Pro.php:149 for the pro version).

    The spl_autoload_register function is loading all of the classes on a site which results in thousands of file_exists checks on large sites, affecting performance.

    Is it possible for a condition to be added, such as below, to drop any non-SWP classes before the file_exists check?

    spl_autoload_register( function( $class_name ) use ($path) {
    
    if (strpos($class_name, 'SWP_') === false) {
    return;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Christine

    (@cdegraff1)

    I will pass this info along to our developer. If you would like to put in a ticket, please email [email protected].

    Just chiming in… I have not tested this – but the thread got my attention. I’ve had other plugins do this, in particular when buddypress is installed and it wreaks havoc. I use multisite networks with a lot of plugins and these checks just slam the site. I know they are for ‘security’ or something, but it’s a bad idea in usage.

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

The topic ‘Performance improvements’ is closed to new replies.