MyBB Community Forums

Full Version: Do deactivated plugins affect Mybb Speed?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a lot of plugins on my mybb forum. But I dont have time to uninstall them by ftp and they are deactivated. Do they (deactivated plugins) affect my mybb browsing speed?
No but they would use diskspace (and if you only deactivated them and not uninstalled) some may leave empty or their tables in your MySQL database, and others might have templates left around.
Only when the plugin is activated is it even loaded so it won't have any affect on your forum speed wise. The above should be taken in to consideration in general as keeping your forum installation neat and tidy will make maintaining it a lot easier.
The only place where deactivated plugin are loaded (IIRC) is the plugins page. So you should see no performance impact outside it from those at all.
(2012-08-20, 06:36 AM)Nathan Malcolm Wrote: [ -> ]Only when the plugin is activated is it even loaded...

I used to think that, but:
APC cache shows a 'hit' for every single file in ./inc/plugins/ , after a simple visit to (front-end) index.php

I was surprised...
(2012-08-20, 07:47 AM)seeker Wrote: [ -> ]
(2012-08-20, 06:36 AM)Nathan Malcolm Wrote: [ -> ]Only when the plugin is activated is it even loaded...

I used to think that, but:
APC cache shows a 'hit' for every single file in ./inc/plugins/ , after a simple visit to (front-end) index.php

I was surprised...

			foreach($pluginlist['active'] as $plugin)
			{
				if($plugin != "" && file_exists(MYBB_ROOT."inc/plugins/".$plugin.".php"))
				{
					require_once MYBB_ROOT."inc/plugins/".$plugin.".php";
				}
			}

Checking with get_included_files(), these are the only files which are loaded on the index:

/var/www/mybb/16/1608/index.php
/var/www/mybb/16/1608/global.php
/var/www/mybb/16/1608/inc/init.php
/var/www/mybb/16/1608/inc/functions_compat.php
/var/www/mybb/16/1608/inc/class_error.php
/var/www/mybb/16/1608/inc/functions.php
/var/www/mybb/16/1608/inc/class_timers.php
/var/www/mybb/16/1608/inc/class_core.php
/var/www/mybb/16/1608/inc/config.php
/var/www/mybb/16/1608/inc/db_mysqli.php
/var/www/mybb/16/1608/inc/class_templates.php
/var/www/mybb/16/1608/inc/class_datacache.php
/var/www/mybb/16/1608/inc/class_plugins.php
/var/www/mybb/16/1608/inc/datahandler.php
/var/www/mybb/16/1608/inc/class_language.php
/var/www/mybb/16/1608/inc/settings.php

And after enabling the "Hello world" plugin, it shows it being loaded:

/var/www/mybb/16/1608/index.php
/var/www/mybb/16/1608/global.php
/var/www/mybb/16/1608/inc/init.php
/var/www/mybb/16/1608/inc/functions_compat.php
/var/www/mybb/16/1608/inc/class_error.php
/var/www/mybb/16/1608/inc/functions.php
/var/www/mybb/16/1608/inc/class_timers.php
/var/www/mybb/16/1608/inc/class_core.php
/var/www/mybb/16/1608/inc/config.php
/var/www/mybb/16/1608/inc/db_mysqli.php
/var/www/mybb/16/1608/inc/class_templates.php
/var/www/mybb/16/1608/inc/class_datacache.php
/var/www/mybb/16/1608/inc/class_plugins.php
/var/www/mybb/16/1608/inc/datahandler.php
/var/www/mybb/16/1608/inc/class_language.php
/var/www/mybb/16/1608/inc/settings.php
/var/www/mybb/16/1608/inc/plugins/hello.php

I don't think we even load all plugin files on the plugin page as we have a plugins cache stored too.

I think this might explain what's going on here: http://stackoverflow.com/a/11301179
(2012-08-20, 03:26 PM)Nathan Malcolm Wrote: [ -> ]...
I think this might explain what's going on here: http://stackoverflow.com/a/11301179

I used eAccelerator for years and am still getting adjusted to APC.
Thanks Nathan