By Jannik L. on Tuesday, 03 June 2014
Posted in General
Likes 0
Views 1.8K
Votes 0
Hey guys, after battling 3 days with my menu which was loading in an odd bunched up way and then spreading to the actual locations... I finally made a breakthrough. Jano at Offlajn was tweaking my Universal AJAX Live Search module and I asked him to take a quick look at my menu and see if he had any tips... he pointed out that it was an on.load javascript event and the only way to fix it was to speed up my javascript. He told me to try disabling some of the optimizations done, as some of them could slow it down rather than speed it up.

As I had JCH Optimizer Pro installed with everything enabled, I thought I had covered my ground, but while doing a YSlow I noticed how big my merged JavaScript file was... so what I did was I disabled that to have multiple smaller ones. I did keep the other settings enabled such as Minify, Compress, Gzip etc. and boom, the problem was solved!

What I am getting at is JCH Optimizer is a fantastic plugin, but if you use all the Stackideas products on the same site and have a couple of modules or a template with JS, I advice against merging all the JavaScript as in my case it slowed my site down by creating one huge file lol...

P.S. I did get a better YSlow score with it enabled, but it actually slowed it down... so take YSlow scores with a grain of salt
how big was your merged JavaScript file before?
·
Tuesday, 03 June 2014 19:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for sharing this Jannik
·
Tuesday, 03 June 2014 23:40
·
0 Likes
·
0 Votes
·
0 Comments
·
N00bter I don't quite remember, I think it was close to 2 mbs... and honestly, why load all javascript at the same time by merging them all together, when you can have smaller on demand javascript files. It was night and day performance difference for me.
·
Wednesday, 04 June 2014 10:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Jannik,

This was the exact stuffs we did in prior releases but it seems like many users dislike the idea of rendering multiple files on the fly because it's taking up the server's bandwidth. We had to merge them all into a single file to avoid issues like this
·
Wednesday, 04 June 2014 12:42
·
0 Likes
·
0 Votes
·
0 Comments
·
@Jannik
i have tested to merge and not merge JS files.
on my end when i disable merging js files my site is in fact slower. i am very happy with the results of jch optimizer pro. the optimum setting works very well on my site

in optimum mode
118 requests, 549 KB transfer, 2.59 s load-time

in optimum mode without merging JS files
140 requests, 559 KB transfer, 5.01 s load-time

so for my site it is even better to merge all my JS files. i think your suggestion should be seen as subjectively of each website. anybody who uses JCH Optimizer PRO should test this on his own environment and decide what is the best setting.
running with: jReview, EB, ED, Jomsocial, yootheme, j2.5
·
Wednesday, 04 June 2014 17:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Noobster, you make a good point that the best way to achieve optimal results on your environment is to test different configurations. Every server environment is different. But I am just cautioning that you should take yslow results with a grain of salt.

Funny enough I have almost the exact same setup as you, except I run Joomla 3.3 and EasySocial instead of Joomla 2.5 and JomSocial. I don't know if it is the difference between EasySocial and JomSocial that affected those results... or whether it is the difference in server config... for example in my case I run SSD and Nginx, php-fpm and APC, you might run HDD and Apache. There is no such thing as a one size fits all setup, the key to achieving best results is through testing the various alternatives and analyzing results.

What I am trying to do by sharing these results is to make it clear that just because Yslow and other performance testers tell you to merge JavaScript, doesn't mean that it is always the wisest idea. For me it was much better to keep the JS files separate, and I am sure that it will be for many others as well.
·
Wednesday, 04 June 2014 19:13
·
0 Likes
·
0 Votes
·
0 Comments
·
By the way, I am just wondering, how are you guys testing the load time?
·
Wednesday, 04 June 2014 22:59
·
0 Likes
·
0 Votes
·
0 Comments
·
-testsites with local tools like: chrome development tools and yslow on firefox.
-livesite with http://tools.pingdom.com/fpt/ and local tools
·
Thursday, 05 June 2014 00:26
·
0 Likes
·
0 Votes
·
0 Comments
·
I am not really sure if it is accurate to really test these with yslow . You should try firebug on firefox and notice that the first request is always the important one. That determines how long the server takes to respond to you. I have just tested this on another site and there's a plugin System - jQuery Easy (It seems to be hogging up about 600ms - 2s) during the initial page load.
·
Thursday, 05 June 2014 03:05
·
0 Likes
·
0 Votes
·
0 Comments
·
yeah YSlow is not good at testing real world applications, but it does provide some decent best practices tips... but in my case I get C grade with what I find to be a great setup... and a B grade with what I find to be a terrible setup... so take that info with a grain of salt.

Chrome Developer Tools is great and provides real world results.

I will say I do like http://tools.pingdom.com/fpt/ for testing, but make sure to choose the location closest to your server to reduce latency, that way you will get a more consistent read and a better baseline. For example I set it to new york, as my server is located there...
·
Thursday, 05 June 2014 03:53
·
0 Likes
·
0 Votes
·
0 Comments
·
subscribe
·
Thursday, 05 June 2014 04:05
·
0 Likes
·
0 Votes
·
0 Comments
·
n00bster wrote:
running with:jReview, EB, ED, Jomsocial, yootheme, j2.5


Hi n00bster, I have a similar setup, but in optimum mode, some things in Jreviews break. Did you have to exclude any scripts?
·
Thursday, 05 June 2014 07:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Mark H wrote:
Hi n00bster, I have a similar setup, but in optimum mode, some things in Jreviews break. Did you have to exclude any scripts?

hi Mark H, no i have nothing excluded. it works like a charm! i have disabled jQuery in jReviews, that is all what i have changed.
·
Thursday, 05 June 2014 17:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for sharing n00bster
·
Saturday, 21 June 2014 15:14
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post