Slow loading file - global-adminbar.php - is it a good idea to combine plugins into one file?

Hello, today I discovered Firebug 'NET' (Love this) where it lets me see what is causing my site to load so slowly. One thing that is taking 1.5 to 2 seconds to load on each page is the global-adminbar.php

That file itself is so small, only having like 37 lines of code...
(1) just curious if someone knows why it loads so slowly, and if there is a way to speed this up (or a different - more efficient way to load the global admin bar)?

* I use the social theme on two sites, and both sites have that file loading slowly.
with just buddypress enabled, the global admin bar takes 500 ms to load... but each plugin I add, that file takes longer and longer to load.. which brings me to my second question:

(2) Once a site is completely set up, is it recommended to combine most of the plugins into one file (like bp-custom.php)? would that save on loading time as well since less files are required to load?

Thanks for any help.

  • Mason

    Hiya Qwerty,

    Well, as to the fist one, if you're not wanting to use the plugin that does this you can just use the default BuddyPress bar instead.

    Simply open your functions.php file and comment out (put // in front of) lines 182, 185, and 186.

    Then open your header.php file and add the following on line 25:
    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/_inc/css/adminbar.css" type="text/css" media="all" />

    Save both files and you'll now use just the buddypress bar rather than the plugin. That should eliminate the load time for ya.

    As for other plugins, yeah, consolidating the code will definitely help with load times there as well.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.