Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Joomla just slow, or can I speed it up somehow?

I have Googled this issue for a good while now, but I can't find a single article that discusses the speed of Joomla rather than the loading speed of external resources like scripts and images. My Apache + PHP setup is performing very well - compression is enabled and I'm using a local virtual machine to run it. The problem is with Joomla on the server side, and I don't know how to track down the source of it.

A page on my local Joomla setup always takes between 2 and 3 seconds to load. According to the Network tab in Chrome Developer Tools, the browser waits for the HTML page for about 2 seconds, then loads all the external resources in about 0.3 seconds. This is the case for every page, even the administrator pages. This leads to very frustrating page-surfing, as every link click is followed by a pretty long wait. For illustration, here is a screenshot of the loading speed graph. The blue line is the HTML page:

Illustration

What is it about Joomla that can take 2 seconds of processing for every request? Is Joomla just this slow, or must something be wrong with my setup? If so, how do I debug it?


What I've tried

  • I've created a PHP page completely separate from the Joomla setup and filled it with <?php phpinfo(); ?> just to confirm that all PHP scripts aren't affected by the 2s delay. They aren't.
  • I've written and executed a small PHP script that connects to the local MySQL server, both by "127.0.0.1" and "localhost", and prints out all the tables in the Joomla database. The script runs in just a fraction of a second, so the fault doesn't lay with DNS issues when connecting to the database.

Joomla profile information for loading the front page:

Application 0.000 seconds (+0.000); 0.81 MB (+0.807) - afterLoad
Application 0.217 seconds (+0.217); 2.29 MB (+1.479) - afterInitialise
Application 0.296 seconds (+0.079); 4.34 MB (+2.055) - afterRoute
Application 0.640 seconds (+0.345); 5.59 MB (+1.247) - afterDispatch
Application 0.705 seconds (+0.065); 5.85 MB (+0.266) - beforeRenderModule mod_menu (Main Menu)
Application 0.774 seconds (+0.069); 5.91 MB (+0.053) - afterRenderModule mod_menu (Main Menu)
Application 0.774 seconds (+0.000); 5.90 MB (-0.009) - beforeRenderModule mod_menu (All Front End Views)
Application 1.004 seconds (+0.229); 6.05 MB (+0.147) - afterRenderModule mod_menu (All Front End Views)
Application 1.004 seconds (+0.000); 6.03 MB (-0.016) - beforeRenderModule mod_menu (User Menu)
Application 1.035 seconds (+0.032); 6.05 MB (+0.021) - afterRenderModule mod_menu (User Menu)
Application 1.036 seconds (+0.000); 6.04 MB (-0.010) - beforeRenderModule mod_menu (A Deep Menu)
Application 1.058 seconds (+0.023); 6.06 MB (+0.017) - afterRenderModule mod_menu (A Deep Menu)
Application 1.059 seconds (+0.000); 6.05 MB (-0.010) - beforeRenderModule mod_menu (This Site)
Application 1.092 seconds (+0.034); 6.06 MB (+0.014) - afterRenderModule mod_menu (This Site)
Application 1.092 seconds (+0.000); 6.05 MB (-0.013) - beforeRenderModule mod_login (Login Form)
Application 1.116 seconds (+0.024); 6.07 MB (+0.023) - afterRenderModule mod_login (Login Form)
Application 1.116 seconds (+0.000); 6.07 MB (-0.002) - beforeRenderModule mod_breadcrumbs (Breadcrumbs)
Application 1.143 seconds (+0.027); 6.09 MB (+0.021) - afterRenderModule mod_breadcrumbs (Breadcrumbs)
Application 1.143 seconds (+0.000); 6.09 MB (-0.003) - beforeRenderModule mod_menu (Top)
Application 1.179 seconds (+0.035); 6.12 MB (+0.028) - afterRenderModule mod_menu (Top)
Application 1.179 seconds (+0.000); 6.10 MB (-0.012) - beforeRenderModule mod_search (Search)
Application 1.207 seconds (+0.028); 6.13 MB (+0.028) - afterRenderModule mod_search (Search)
Application 1.236 seconds (+0.029); 6.15 MB (+0.014) - afterRender

Notice that the "afterInitialise", "afterDispatch" and "afterRenderModule mod_menu (All Front End Views)" steps take almost a third of a second each. Each of those points run for longer than I would accept the whole script running. Any clues on how to reduce those?

I hope this question is specific enough that it won't be closed instantly. If there's anything I can do to make it more specific, please comment.

like image 731
Hubro Avatar asked Feb 27 '13 22:02

Hubro


People also ask

Why is Joomla so slow?

Heavy templates: Some Joomla templates are heavier than others. If you choose a template that has a lot of non-optimized code and large images, then expect this template to slow down your whole website.


1 Answers

joomla is just slow (i expect to get marked down for this), but it is. I have tested with APC, eAccelerator and a couple of others with various versions of PHP and apache, even tried with nginx, both as a module and FastCGI.

it seems that joomla is just bloated now. personally, if your using it for simple CMS purposes, i would recommend wordpress for beginners, or drupal for more advanced users.

like image 197
bizzehdee Avatar answered Sep 20 '22 23:09

bizzehdee