Let's start at the end of it.
@tancredi:
In order for me to also get to the bottom of this, is it safe to say that when we resolve the compression related issues we will witness a consistent speed improvement? What else can be done?
Compression is one thing, pipelining is other. Let me quote myself 🙂
@MakaryGo:
loading many different assets, some of them rather large - because you
have some plugin enabled, Grav ‘attaches’ to the end HTML code six
different stylesheets, if I remember well, same thing with JS files. So,
each of them is taking one request and one response. Because of this
modular behaviour, Grav has built into the core function called ‘assets
pipelining’, it just needs to be enabled. When you do so, system will
collect all the CSS files, and attach them to the code as one entity, which
will take only one HTTP request and response. Same with JS. There is a tool
for it, you just have to enable it
This step should give some loading speed boost. In my case, on some mock Grav instance I have, without real content and graphics, change was:
|
Mobile |
Desktop |
| Before |
63 / 100 |
81 / 100 |
| After |
76/100 |
89/100 |
Note, I am using custom JS as well (Masonry) and I didn't change any caching or compression options, only pipelining.
@tancredi:
as you probably are aware of mautic should work seamlessly with grav we are using its plug in,
I'm afraid I can't help with Mautic integration, I don't use it. If you have any problems with plugin, probably best way to proceed would be to contact said plugin's author. Also, please mind that this plugin (if I'm looking at the right GitHub repo) wasn't updated in a year, so it may not work perfect with latest Grav version.
@tancredi:
what are you referring to exactly with “theme being not responsive”?
I meant rather that it's not fully responsible. As you well know, I'm sure, Responsive Web Design (RWD) means that we're serving to a client version of website that will look best/good enough on a device that client is using. It means of course serving a website that is narrower and has more compact navigation, but not only.
Mobile devices (aka 'handhelds') not only have smaller screen than desktop or laptop computer. They also use different web connection, different hardware (CPU, GPU, RAM) and software. So, for website to be truly responsible, it has to display not only different size, but different assets as well. As I wrote before:
@MakaryGo:
there is no need to send 1900 pixel wide picture to a smartphone that has a screen 600 px wide.
And files that big have their weight, so it slows down the process unnecessarily.
Ad. 4, as I said before, I haven't seen the previous version of this website, so I cannot tell if it is better or worse now. I can only tell you, based on my experience in frontend, that the present theme uses some techniques that are not optimized for speed. I.e.:
On the main page you're loading 3 pictures as a cell background, here:
<img src="//cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex036/uploads/getgrav/original/1X/b04265a0eff19aab0cbb38baa948541f958dc780.jpg" width="690" height="150">
First one on the left, despite the size it's displayed in, is loaded by the browser like this:
<img src="//cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex036/uploads/getgrav/original/1X/7a8d237631b5fcb9c14ec0b924d31733788ad335.jpg" width="690" height="331">
It is almost 2000 px wide and weights almos one megabyte. If you would use cropped, and/or optimized version of it, I bet it wouldn't weight more than ~140 kb.
It means, that this single pic would load five times faster.
Am I clear enough now? 🙂