6

I work as an apprentice web developer who has been left in charge of the web team (all of my colleagues have left) and have been left with an impossible task.

We have a 10-core Windows server, with more than enough memory, and host multiple Joomla! websites, as well as custom-built HTML and PHP websites. There are no issues with the custom-built websites, all loading is instant. However, all of the Joomla! websites (all are eCommerce) are so slow and can take 30 seconds to load.

I have ran multiple speed tests on the websites and believe me, i know what most of you are thinking.

"Reduce image size and compress CSS and JavaScript"

I have already done this. The issue lies with TTFB (Time To First Byte), as this can take up the whole 30 seconds.

The following website shows you the TTFB.

http://www.bytecheck.com/results?resource=http%3A%2F%2Fhealthypetstemp.co.uk.5-189-187-215.premierepos.co.uk%2Fen%2F

This is just one of the Joomla! websites that we host and i can provide more if needed. You can also check the speeds using Google Chrome DevTools, but it will just tell you the same thing.

Like I said, it is this that is causing the issue and would greatly appreciate some assistance in this matter.

Thanks in advance.

3

Ok, let's start from the beginning.

Firstly, you should be running Chrome's Lighthouse test to detect any performance related issues. In Chrome, press F12, then go to the Audit tab.

I ran an audit on Desktop with no throttling and the performance is simply terrible.

So, first thing first, disable the Joomla JCH Optimize plugin so that you can see all of the assets being loaded.

1 - General:

You appear to be loading way too many assets and your Node list is over 4.5k when it should be under 1.5k. Start thinking about changing your page structure and moving certain elements to other pages if need be. Only display critical content on the homepage.

As for the many assets, one example being that you're loading 7 fonts. This simply isn't justified at all. If you want to load FontAwesome for icons, that's fair enough, but you do not need 6 other fonts to style your content. This is poor design. Choose 1 font for your brand, stick with it, and remove the rest.

2 - HTTP/2.0:

Get a free SSL certificate from LetsEncrypt, install it on your server, then enable HTTP/2.0. This update changes the way assets are fetched and thus will reduce the time taken to load them.

3 - LazyLoad:

A good website in 2018 renders the HTML first with a small chunk of critical CSS so that the initial page load doesn't look all over the place. Once the basic HTML is loaded, you then lazy load your CSS, JS and images. What you're currently going it loading all CSS and JS in the <head>, meaning the browser will wait until they have downloaded, before it continues rendering the rest of the HTML.

I prefer doing this at the template level (faster) rather than relying on plugins...but then against, I'm a UI developer so I develop my own templates.

You may want to consider building your own template.

Someone I've personally worked with on the Joomla CMS has some great tutorials on how to create your own template:

https://www.youtube.com/channel/UCSinMbPPdEPx6Hw5QcueITg/featured

4 - SVG'S:

There are several images on your site that can be SVG's instead of PNG's. You're loading 200x200 pixel images and they're being rendered at 94x94. Start using SVG's which will in most cases be smaller in size, and won't lose clarity when the page is zoomed in or on a retina device.

5 - Images:

Your images are simply too large in size for what they are. Each slider image is between 250kb and 500kb. Furthermore, the images are not lazy loaded. For images such as photos or anything else that won't perform optimally as an SVG, use WEBP which is a format developed by Google. You will need to have a fallback for browsers that don't support it though.

5 - Caching:

Do not use PHP to cache your assets! Do it at the server level (Apache, NGinx, etc). Have a look around for some tutorials on this or maybe talk to your hosting provider/server amdinistrator.

I hope this gives you a little insight to help you improve your product.

2

Have you done already these basic checks?

1 - Enable Joomla Caching

This will already significantly boost your page loading times

Go to your plugins and open Page Cache plugin Usually it shall be already configured like this:

enter image description here

Save and close it

2 - Configure your Cache TTL and behaviour

Go to System - Global Configuration - System(-tab)

enter image description here

  • Enable the Caching to "ON progressive"
  • set Cache time according to this (from our measurements)
    • 30 or less for high load pages with 200+ visits per day
    • 60 for medium load pages with 100+ visits per day
    • 120 for low load pages with 50+ visits per day
    • 240 for very low load pages with 20+ visits per day

This values we have accumulated from about 1 year of measuring multiple pages. If you have more than 200+ visits a day, you shall know already what you do from the cache time. But a rule of thumb: if you regularly update your content (let's say in medium of 15 minutes intervals) your cache time should be of course matching to your needs (15 mins or less). If you can live with longer outdated delivery of content you can of course keep a longer cache time.

Drawbacks But do not forget on any joomla/plugin/extension update this cache could produce for you a 500 error. In this case you can simply drop the cache in the Menu - System - Clear Cache (Delete All) But here you have to have clearly an eye on it. Means you need to monitor and check it!

3 - Add a minifier and precaching plugin

There are multiple plugins out there. Also it really depends how well you like the plugin. All do the same:

  • minify CSS, JS, HTML
  • concatenate multiple CSS files into one or few
  • concatenate multiple JS files into one or few
  • concatenate multiple HTML files into one or few

Sometimes they can even help you to improve image conversion or image concatenating into sprites. But this does not boost so much your page performance. Here you are doing the level of "cherry on the cake"

0

Usually this is caused by a piece of poorly designed code, a bad plugin, some mistakes or bad approaches in the code, and/or not optimized mysql queries.

Sometimes it may also be the combination with the server configuration.

You need to debug and do a number of tests and experiments e.g. disabling plugins, changing templates etc.

In some cases optimization plugins like jch may not perform that well and result in a slower website.

Make sure you also use the latest versions of Joomla and extensions and report any issues to their developers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.