analysis of elgg performance using the newrelic online app

after some exploration of the extensive server monitoring and performance analysis app - www.newrelic.com

i have found the following with my elgg install (1.8.16):

  • minify: the minify plugin's minification process was being triggered in places where it didn't need to be and was hugely slowing down the website. solution/workaround: disabled the plugin and now use cloudflare's inline minification..
  • language translation: where specific language strings are missing from translation files a helper process of some kind is run to locate a suitable string (i don't know much more than that presently) - which was slowing the performance. temporary solution: disabled all non english languages until this can be resolved more effectively.
  • 'your groups' topbar menu: i am running a version of the plugin which adds a dropdown to the topbar to allow access to all the groups that you are a member of. this is very slow to process the required sql.. solution: find a more efficient query structure (details below.)
  • videolist thumbnails:the php file for the videolist thumbnails is the slowest non core file on my site by quite a long way. the server trace shows that the entire elgg setup of all plugin initialisation processes is being run each time the thumbnail.php file is run.. this is hugely inneficient. solution: the thumbnail php file access process needs to be redesigned.
  • pagehandler.php:some traces for pagehandler.php list the plugin initialisation process as running for 12 seconds per page load! 4 seconds for elgg_load_plugins and 8 for the various plugin initialisation processes. i do have 40+ plugins on my site, however, i think that there is a design flaw in the process here.. why are these plugins reinitialised over and over on each page load? and why are they ALL being loaded regardless of whether they are needed on the current page? surely there is much scope here for improvement? next step: pass to core team for comments.
  • elgg_view: the repetition of the elgg_view function so many times on some pages appears to add an overhead that amounts to potentially seconds of delay.. i haven't done in depth analysis of this, however, some pages (such as the activity river) trigger this view 30+ times per view - this soon mounts up. question:has anyone performed any detailed efficiency tweaking of this?

 

re: the your_groups query.. the present query used is:

    $content = elgg_get_entities_from_relationship(array(
        'type' => 'group',
        'relationship' => 'member',
        'relationship_guid' => elgg_get_logged_in_user_guid(),
        'inverse_relationship' => false,
        'limit' => 0,
    ));

does a more efficient query exist here that can get the current user's groups? can this be cached in a way that it isn't already?

any comment and answers welcome!

Performance and Scalability

Performance and Scalability

If you've got a need for speed, this group is for you.