By Horst Fuchs on Friday, 28 August 2020
Posted in General Issues
Replies 41
Likes 0
Views 1.2K
Votes 0
Hi, I was interested in my current page performance and tested with http://www.gtmetrix.com As a result there is the following hint given and I would like to know if there is an advice from your side if there is something possible to do without affecting the functionality of my page? Is there a known Joomla tool which can be used?
The files is already minified and compressed and I noticed you have already enabled the Gzip compression from backend global configuration, then you have to add the following to your .htaccess file if your hosting provider supports this:


AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
·
Friday, 28 August 2020 16:58
·
0 Likes
·
0 Votes
·
0 Comments
·
"add the following to your .htaccess file" hmm doesnt have any positive effect for this metrix for GTmetrix score of Defer ES javascript..

I would use this one https://www.daycounts.com/shop/free-stuff/javascript-async-defer and put in settings "Scripts to modify" in plg there: you can try if it get better pls get back and tell us your results

/media/com_easysocial/scripts/bootloader.js
/media/com_easysocial/scripts/site-3.2.17.js
/media/com_easysocial/scripts/site-3.2.17.min.js
/media/com_easysocial/scripts/site-3.2.17-basic.js
/media/com_easysocial/scripts/site-3.2.17-basic.min.js
/media/com_easysocial/scripts/admin-3.2.17.js
/media/com_easysocial/scripts/admin-3.2.17.min.js
/media/com_easysocial/scripts/admin-3.2.175-basic.js
/media/com_easysocial/scripts/admin-3.2.17-basic.min.js
/media/com_easysocial/scripts/site/toolbar/system.js
/media/com_easysocial/scripts/site/toolbar/notifications.js
/media/com_easysocial/scripts/site/toolbar/friends.js
/media/com_easysocial/scripts/site/system/notifier.js
/media/com_easysocial/scripts/site/system/notifications.js
/media/com_easysocial/scripts/site/system/broadcast.js
/media/com_easysocial/scripts/site/dashboard/default.js
/media/com_easysocial/scripts/vendors/jquery.easysocial.js
/media/com_easysocial/scripts/vendors/jquery.js
/media/com_easysocial/scripts/vendors/lodash.js
/media/com_easysocial/scripts/vendors/mvc.js
/media/com_easysocial/scripts/vendors/select2.js
/media/com_easysocial/scripts/vendors/swiper.js
/media/com_easysocial/scripts/vendors/bootstrap3.js
·
Friday, 28 August 2020 21:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for sharing ssnobben! Good share

Happy to see the community helping one another!
·
Friday, 28 August 2020 22:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi @all,

thanks for your support and feedback - just installed the mentioned plugin but there seems to be no difference .... also the entry in .htaccess does not effect anything ....
·
Friday, 28 August 2020 23:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok pls let Arlex investigate this and also share why this doesnt work..
·
Tuesday, 01 September 2020 15:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok pls let Arlex investigate this and also share why this doesnt work..


Do you use the tool with those mentioned script path's?
·
Tuesday, 01 September 2020 17:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Horst,

To be frank with you, currently I have no ideas what other tools can able to optimize this.

May I ask you a question? Do you feel slow when you access on your site?

Because for those score will not impact much for the performance issue even the speed analysis score is low but for me I will more concern about the site first initial server response, if the first initial server response is around 1 minute.

From what I tested on your site several times, about your first initial server response is less than 1 minute, it is consider the page load very fast already.
·
Tuesday, 01 September 2020 18:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,

hope to understand you right - may be the time until the server responds is caused by the location ..... I do not know. Normally I would say everything seems to be okay. I only wanted to ask the performance question because of the GTMetrix test..... and may be there are some good hints from you or other users. If not it seems to be okay .....
·
Tuesday, 01 September 2020 19:07
·
0 Likes
·
0 Votes
·
0 Comments
·
I will keep this thread open for others who have good experience on this, also, please don't hesitate to share with us any recommend for this if you know of by leaving your comments.
·
Wednesday, 02 September 2020 13:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi all,
Unfortunately, not being able to defer some of these .js files could have a significant impact on websites.

1) First and foremost, the Easysocial/Easyblog js files are big and in many cases comprise more than 50% of the page size. So that in itself causes slow page loads, especially on mobiles.
2) Having to wait for the file to download and execute first, before displaying the rest of the page, means that there is a delay before you see content on the page . Its better for users if some content is shown on the page while the rest loads, rather that looking at a blank screen waiting for something to happen.
3) For SEO, Google is penalising slow sites.
4) With the new Google updates, there are rumours that sites are soon going to have a badge assigned indicating their speed. Just like if you aren't using SSL, Chrome shows a message saying that you site is not safe, Chrome browsers will show visitors a badge indicating if your site is fast or slow.

Note that for testing (using Google pagespeed/lighthouse etc) speed is mainly being measured as time to first content i.e. how long before the page shows something. They also measure for mobiles (mobiles-first strategy) .
So even if your site is relatively fast loading, you will still be penalised if you do not defer loading of js files.
Note that Google is ALSO using data from Chrome users to work out page loading speeds, so although speed tests may indicate deferring js files to get speed improvements, they are not the only measure used to work out your site speed for Google performance rankings. Nonetheless, time to first content on mobiles should be your main concern for maximum speed rankings


Having said all that, as indicated elsewhere, the real performance issue should be focused on the user experience, especially on mobiles. If that is good, the rest will follow naturally.

So for me, the most important questions is:
What is the minimum we need to include in the js file to get the site to render.
Anything else, from swipers to notifications, should be packaged into a seperate .js file, which can then be deferred and loaded asyc. This will also benefit logged in users, where page loading speeds are always an issue.

Maybe that's something that the Stackideas team can look into?


How Fast Should A Website Load & How To Speed It Up
·
Friday, 25 September 2020 16:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Agree 100% Marc.

This is the most slowdown for any Joomla site that using EasySocial and have a huge impact on performance for everyone that uses EasySocial with Joomla.


Pls Marc & Stackideas guys - please fix this as soon as possible though all your customers will benefit hugely for this std behaviour of every other Joomla component.

Thks and all the best!
·
Friday, 25 September 2020 16:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for your input Marc, we can try optimize this but this will be very tricky and it might need to spend more time to experiment this because it involved the EasySocial Internal JavaScript and others JavaScript library whether can able to make it compatible with each other.
·
Friday, 25 September 2020 19:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Current topic. With the help of preload, we managed to increase the performance by 20 points in Google pagespeed. For mobile devices, the situation has not changed much, the red zone.
https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content

Something has to be done about it:D

But this is a rather complex topic with many nuances. In fact, Google Pagespeed is just recommendations. How they affect search results is a big question. Implement everything that is written there to the detriment of the functionality of your site, which in the end may even harm.
For a site with analytics, advertising code, images, file min.js easysocial doesn't really matter that much. You need to consider the whole complex of factors, use rel= "preload", loading= "lazy", decoding= "async"...
But in the competition for milliseconds, it does. I think that the ability to not include unnecessary scripts in this file is important. For example, if I don't use the Marketplace, and this is an additional 20% weight to min.js, then I should be able not to include unnecessary scripts in this file, the same thing about events, conversations, and so on.
·
Monday, 15 February 2021 09:23
·
0 Likes
·
0 Votes
·
0 Comments
·
By the way, if you prescribe async


<script src="https://site.com/media/com_easysocial/scripts/site-3.2.24.min.js" async></script>


then it works every other time. The browser does not always have time to process the script. Because of this, the functions on the page do not work.


<script type="text/javascript">

//<![CDATA[

EasySocial.module("init", function($) {
this.resolve();

}).done();

//]]>

</script>


Perhaps the solution is to prescribe a delay using setTimeout

setTimeout(() => {
//here is the script
}, 1000)




P.S.
By the way, checked "async" and " setTimeout "on the" DOMContentLoaded " event works for google pagespeed. 97 for PC and 58 for mobile. But visually it became much worse. The delay is visible. That is, what is good for from the point of view of Google Pagespeed is bad from the point of view of the user experience.
·
Monday, 15 February 2021 14:22
·
0 Likes
·
0 Votes
·
0 Comments
·
So for me, the most important questions is:
What is the minimum we need to include in the js file to get the site to render.
Anything else, from swipers to notifications, should be packaged into a seperate .js file, which can then be deferred and loaded asyc. This will also benefit logged in users, where page loading speeds are always an issue.

Maybe that's something that the Stackideas team can look into?


I agree. It seems to be the most reasonable solution. Make min.js with a minimum of necessary scripts for rendering. No need to loading everything at once.
·
Monday, 15 February 2021 15:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for your input Kirill.
·
Tuesday, 16 February 2021 11:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Nice discovery Kirill
·
Tuesday, 16 February 2021 16:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi
When really want high performance in google pagespeed:D
For google robots - asynchronous, for users without async

public function createScriptTag($path)
{
function isBot(){
$bots = array(
'Google PageSpeed Insights','Googlebot','Chrome-Lighthouse'
foreach($bots as $bot)
if(stripos($_SERVER['HTTP_USER_AGENT'], $bot) !== false){
return true;
}
return false;
}
if( isBot() ) {
// script for bot
$script = '<script' . (($this->defer) ? ' defer' : '') . (($this->async) ? ' async' : ' async') . ' src="' . $path . '"></script>';
} else {
$script = '<script' . (($this->defer) ? ' defer' : '') . (($this->async) ? ' async' : '') . ' src="' . $path . '"></script>';
}
self::$attachedTags[] = $script;
return $script;
}


But this is certainly not the solution. File min.js is actually huge, for mobile, you will not be able to get out of the red zone for all pages, for example, for album pages. async and defer not help. You need to significantly reduce the size, this is exactly the case when several files will be more efficient than one huge one min.js.
·
Tuesday, 16 February 2021 18:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Ideally, there should be light scripts versions for guest visitors, including Google.
Because most javascript features are not enabled for Guests.

Philippe
·
Tuesday, 16 February 2021 18:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi
When really want high performance in google pagespeed:D
For google robots - asynchronous, for users without async

public function createScriptTag($path)
{
function isBot(){
$bots = array(
'Google PageSpeed Insights','Googlebot','Chrome-Lighthouse'
foreach($bots as $bot)
if(stripos($_SERVER['HTTP_USER_AGENT'], $bot) !== false){
return true;
}
return false;
}
if( isBot() ) {
// script for bot
$script = '<script' . (($this->defer) ? ' defer' : '') . (($this->async) ? ' async' : ' async') . ' src="' . $path . '"></script>';
} else {
$script = '<script' . (($this->defer) ? ' defer' : '') . (($this->async) ? ' async' : '') . ' src="' . $path . '"></script>';
}
self::$attachedTags[] = $script;
return $script;
}


But this is certainly not the solution. File min.js is actually huge, for mobile, you will not be able to get out of the red zone for all pages, for example, for album pages. async and defer not help. You need to significantly reduce the size, this is exactly the case when several files will be more efficient than one huge one min.js.

Lol this is a good idea to trick the google crawler but you are definitely right, it is not a good solution for this and it is not easy to split out the Javascript code from the minify .js file currently.

We will see if we can figure out a better solution for this.

Ideally, there should be light scripts versions for guest visitors, including Google.
Because most javascript features are not enabled for Guests.

Thanks for your input.
·
Wednesday, 17 February 2021 18:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Lol this is a good idea to trick the google crawler but you are definitely right, it is not a good solution for this and it is not easy to split out the Javascript code from the minify .js file currently.

We will see if we can figure out a better solution for this.


Yes, should not deceive google pagespeed and yourself:) Hopefully with time you will be able to optimize js

Ideally, there should be light scripts versions for guest visitors, including Google.
Because most javascript features are not enabled for Guests.


I agree, maybe even so :
1. For guests, scripts required for rendering.
2. For guests, scripts that can be loaded asynchronously.
3. For registered, scripts required for rendering.
4. For registered, scripts that can be loaded asynchronously.
·
Wednesday, 17 February 2021 21:10
·
0 Likes
·
0 Votes
·
0 Comments
·
Here's another good example for optimization:
I'm testing the download to a mobile device on a 3G network.

media/com_easysocial/scripts/site-3.2.24.min.js - 16.64 sec
which causes
media/com_easysocial/scripts/vendors/swiper.min.js - 1.9 min !!!

And that's on a page where swiper isn't even used. ( although I've completely given it up, it's heavy)
·
Thursday, 18 February 2021 14:13
·
0 Likes
·
0 Votes
·
0 Comments
·
The swiper.js should not be rendered on non mobile pages. Please create a new ticket on the beta section and we'll look into this
·
Thursday, 18 February 2021 14:58
·
0 Likes
·
0 Votes
·
0 Comments
·
@krill. Can you take a lead on this?

Cheers!
·
Thursday, 18 February 2021 15:35
·
0 Likes
·
0 Votes
·
0 Comments
·
The swiper issue will be fixed on beta 3
·
Friday, 19 February 2021 10:50
·
0 Likes
·
0 Votes
·
0 Comments
·
The swiper issue will be fixed on beta 3


Thank you very much
I tried to figure out what exactly is happening on the page:
1. Developer console, mobile, low-end mobile
2. The page with the easysocial Pages module, displays the last 30 pages with images.
3. Download min.js, an average of 15 sec.
4. Challenge swiper.min.js.
5. Loading 30 images background-image: url-1.9 min
6. All this time swiper.min.js waiting for 30 images to load
7. This does not happen, where the images in the tag img loading= " lazy"
I think I'll just redo the module template. A good illustration of the difference between background-image and img, and the work of lazy loading, although there are also solutions for background-image, but it still turns out slower.
But also swiper.min.js this page is not needed for anything at all, just a page of modules without anything.
I continue to test, if there are good practices for optimization, I will write...

@krill. Can you take a lead on this?

Cheers!


Good health to you too:D
The issue is resolved
·
Friday, 19 February 2021 15:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Thks Krill This interesting too check it out Stackideas..

https://web.dev/serve-responsive-images/
·
Friday, 19 February 2021 16:07
·
0 Likes
·
0 Votes
·
0 Comments
·
You have to be extremely careful with lazy loading. Especially with problematic plugins and templates. We have had so much issues with 3rd party plugins and templates and this is why we gave up adding any lazyloading on the images.

I prefer to just rely on mod_pagespeed to do the job.
·
Friday, 19 February 2021 22:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi. I posted a comment in Feature Requests https://stackideas.com/voices/easysocial/item/543-light-scripts-js-versions-for-guest-visi

And interested: if I don't use events, pages, audio, etc. Can I edit main JS-file and delete parts of codes related to events, pages, audio to make file less? Thanks.

Another way is to use several JS file instead one. And disable file if disabled feature. For example:
1) site.js – common and lite necessary JS-file that will make work website with minimum of features
2) events.js – it will load only if Event feature is enabled on site.
3) pages.js (cluster.js) – it will load only if Pages / groups / features is enabled on site.
4) marketplace.js – it will load only if Marketplace feature is enabled on site.
5) videos.js – it will load only if Event feature is enabled on site.
6) polls.js – it will load only if Polls feature is enabled on site.
7) photos.js – it will load only if Event feature is enabled on site.
8) audio.js – it will load only if Audio feature is enabled on site.
9) sharer.js – it will load only if Sharer feature is enabled on site.
10) social.js – it will load only if Social Integrations feature is enabled on site.
11) conversations.js – it will load only if Conversations feature is enabled on site.
12) location.js – it will load only if Location feature is enabled on site.
13) socialbookmarking.js – it will load only if Social Bookmarking feature is enabled on site.
14) reporting.js – it will load only if Reporting feature is enabled on site.
etc.
For example I don't use Audio, Marketplace, Events, Pages, Advertisement and much more.
May be you think that 10+ mini JS-files is worse that 1 bigger file? I don't think so. Anyway EasySocial can combine/compress them in one (only those file that you need). ? Or use 3party extension.
The same feature realist for modules. Every single module should use it's own mini JS-file and don't use huge /media/com_easysocial/scripts/site-3.2.17.min.js
If I publish on standard Joomla article page one ES module I don't need to load this site-3.2.17.min.js for example.
May be the same should be with CSS files. I don't know.
Note:
My dashboard EasySocial page loads 7.76+ sec. ?
My homepage (Non EasySocial page) without any EasySocial modules loads 1.49+ sec. ? If I publish on this-homepage any ES module it start to load big script and homepage become slowly.
I can see that EasySocial 4 use the same method as EasySocial 3. But JS and CSS files become bigger.
·
Thursday, 25 February 2021 20:46
·
0 Likes
·
0 Votes
·
0 Comments
·
And interested: if I don't use events, pages, audio, etc. Can I edit main JS-file and delete parts of codes related to events, pages, audio to make file less? Thanks.

Unfortunately, it is not possible to remove some of the Javascript code after the system minified the Javascript code to 1 line.
·
Friday, 26 February 2021 19:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Maybe a simple way is to use a "reduced size" js file when lockdown mode is selected.

EasySocial lockdown mode is designed to prevent any guest from seeing community content, but allowing them to register on the site. That means that no EasySocial info apart from the sign-in/ registration page or module will be used in public mode.
Can we not create a JS file with only that functionality, then amend ES so that this file is loaded instead when lockdown is enabled and guest is not logged in?

This way we can significantly reduce the JS file size for lockdown mode and not have to do major issues with ES for all the other variations, where lockdown is not used or required?
·
Thursday, 04 March 2021 16:52
·
0 Likes
·
0 Votes
·
0 Comments
·
FYI seem now working nice with Stackideas apps.

Announcing: LSCache for Joomla v1.4

In this release: ESI support with OpenLiteSpeed, bug fixes, and more!

RELEASE LOG:

[New Feature] Use ajax calls to render ESI modules on OpenLiteSpeed Web Server.
[New Feature] Add "Purge LiteSpeed Cache" button to admin status bar.
[Update] Add French language support. (Thank you GEORGES Gerald for your contribution)
[Update] Load ESI module language file before rendering module content in case language file has not yet been loaded.
[Update] Purge URL now supports reverse proxies (cloudflare, nginx, etc).
[Update] Add purge URL domain check, new lines for each message, and improved language strings. (Thank you @AndySDH for your contribution)
[Bugfix] sh404sef component 404 page is no longer cached.

https://www.litespeedtech.com/products/cache-plugins/joomla-acceleration/download
·
Thursday, 04 March 2021 17:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you ssnobben for this information

My hoster offers Litespeed as an option. And precisely I was hesitant to take it, because with EasySocial does not really generate static pages. On the contrary, it is always on the move and with ajax.

So, do you confirm ssnobben that EasySocial is much faster with LSCache ?

Philippe
·
Thursday, 04 March 2021 20:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Yeah it works now and its fast. If any problem check with your host.
·
Thursday, 04 March 2021 21:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi. LSCache should be installed on:
1) server
2) and Joomla?

Can you please share your best settings for EasySocial? Thanks.
·
Thursday, 04 March 2021 21:31
·
0 Likes
·
0 Votes
·
0 Comments
·
You install the latest plg and component. Then render all modules as EIS modules except login etc that you want to have "normal". Your hosting provider should also have LSI installed. Its not much settings but check plg order in Joomla system if any problem with other plgs. Jotcache last for example.

This works great with Jotcache https://extensions.joomla.org/extension/xt-adaptive-images-pro/
·
Thursday, 04 March 2021 22:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Marc,
Maybe a simple way is to use a "reduced size" js file when lockdown mode is selected.

EasySocial lockdown mode is designed to prevent any guest from seeing community content, but allowing them to register on the site. That means that no EasySocial info apart from the sign-in/ registration page or module will be used in public mode.
Can we not create a JS file with only that functionality, then amend ES so that this file is loaded instead when lockdown is enabled and guest is not logged in?

This way we can significantly reduce the JS file size for lockdown mode and not have to do major issues with ES for all the other variations, where lockdown is not used or required?

Sound like good ideas but when thinking further a little bit then we realized that this might not work because the login username and password label also rely on Javascript. Another thing is what if the site admin decided to render the quick registration form on the login page, so all the different types of custom fields also required to load different types of Javascript for verification and the output part as well.
·
Friday, 05 March 2021 11:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for the update.
·
Friday, 05 March 2021 16:29
·
0 Likes
·
0 Votes
·
0 Comments
·
You're most welcome.
·
Friday, 05 March 2021 16:55
·
0 Likes
·
0 Votes
·
0 Comments
·
this could also a idea/option to turn easysocial in a turbo mode:
https://github.com/jreviews/peepso-turbo
·
Thursday, 11 March 2021 23:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for sharing
·
Thursday, 11 March 2021 23:17
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post