-
AuthorPosts
-
March 14, 2009 at 5:27 pm #139130
hi all,
i’m using ja teline II for a new web site on joomla 1.5The site is http://www.uniriot.org/uniriotII and is at 90%
I have a big problem with load time, because the site is very slow. I think that this is a problem of Ja TelineII as you can see in other posts., The problem is ja news that slow the site.
As u can see from http://www.websitepulse.com/help/tools.php when i load the site i have to wait 12-15 seconds and the second time only 1-3 seconds(because i have the cache active). If i don’t use the cache the site is very slow.
Can u help me?? I tried also to deactivate the module of videos, etc..the situation is quite better but the problem is the ja news module.
Can u hep me??WHat do you think about the site??? Have a good template but a slow site is a problem!!!!:((
thanks
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 14, 2009 at 11:43 pm #296008<em>@camillo290182 117737 wrote:</em><blockquote>hi all,
i’m using ja teline II for a new web site on joomla 1.5The site is http://www.uniriot.org/uniriotII and is at 90%
I have a big problem with load time, because the site is very slow. I think that this is a problem of Ja TelineII as you can see in other posts., The problem is ja news that slow the site.
As u can see from http://www.websitepulse.com/help/tools.php when i load the site i have to wait 12-15 seconds and the second time only 1-3 seconds(because i have the cache active). If i don’t use the cache the site is very slow.
Can u help me?? I tried also to deactivate the module of videos, etc..the situation is quite better but the problem is the ja news module.
Can u hep me??WHat do you think about the site??? Have a good template but a slow site is a problem!!!!:((
thanks</blockquote>
There is no easy answer to this. It has been raised quite a few times. Partly, it is due to the template but the problem may be with the way Joomla is also configured — in modular manner — to easily integrate in house or third party extensions.
Think of houses, rooms in each house, file cabinets in each room, racks in each file cabinet, folders in each rack, and files in each folder — that is the analogy of the modular structure of Joomla-Joomlart . Imagine trying to write a paper, and you have to go to all these places to get the materials and information you needed — before you can even begin to write, let alone present your paper.
Text usually upload and presented more easily, even with the aforementioned issue, but images take longer. If you have not optimized your images (a single raw digital image for example is 1-5Mb), they will load longer. Even a small 500-400px image may occupy 100-400kb. Imagine not one but several dozens or more, and the size grows significantly.
Joomlart also used a lot of gif icons — including simple horizontal and vertical lines, so that the Home page has almost a hundred(???) of these gif icons.
Further, because of the modular layout, the “nested divs” used to design the template layout, the more modules needed, the more complex the labyrinth that must be structured before they are filled and presented to the page visitor.
The above and more, including database configurations affect page upload and presentation.
If you have a very fast server, where your site is located, this might help a bit in speeding the operation. Then, there is also your own internet connection.
The above are related with Page Optimization issues, there are a number discussions in the internet, about this, including a series from Yahoo. Optimization requires hacking the entire script and the related CSS files.
For example, since images naturally take longer to load, in simple html scripting, there are ways to delay loading of images. Google also has found ways that simple rearrangement of some fot the scripts have impact of page loading and presentation. Plus, of course they have very powerful servers.
I have the same problem as you do, and recognized this quite a long time ago. What is required to optimize a page however, is task that is rather quite beyond my expertise. Moreover, unless Joomla, Joomlart and others creating extensions are committed to the need for optimization, it is a rather daunting task.
One of the reasons why I espoused for the creation of a Collaborative Support Group, in the forum last year is that it is questions like this that could be resolved only if website creators, like ourselves band together to address the issues, including page optimization.
Cornelio
1 user says Thank You to cgc0202 for this useful post
March 15, 2009 at 9:36 pm #296135this template is a very big disaster in load time.
If you go to http://analyze.websiteoptimization.com you can understand why the template ja teline II is very slow. ( you can see the attachment 1.jpg). Use these site to make a test on my web site to study the template problems of ja telineII.
the template load 58 css images and 12 scipts for a total time of 14 seconds only for that!!!!!! this is absolutely a crazy approach!!!
after hours and hours off thinking i find a little solution. You ave to delete all the css code of the file typo.css and you will have 5,67 seconds of load of css images instead of 11,87 seconds (as u can see in the attachment 2.jpg)
in this way If u use smaller images u can have quite reasonable load time of the site. (using the cache!!)
This is only one solution for have smaller load time but there are a lot of things to do. Can joomlart give us a solution for that big problem?? this template is not professional whith this load time!!
can u help us please??
thanks again, Camillo
-
cgc0202 Friend
cgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 16, 2009 at 1:19 am #296152<em>@camillo290182 117941 wrote:</em><blockquote>this template is a very big disaster in load time.
If you go to http://analyze.websiteoptimization.com you can understand why the template ja teline II is very slow. ( you can see the attachment 1.jpg). Use these site to make a test on my web site to study the template problems of ja telineII.
the template load 58 css images and 12 scipts for a total time of 14 seconds only for that!!!!!! this is absolutely a crazy approach!!!
after hours and hours off thinking i find a little solution. You ave to delete all the css code of the file typo.css and you will have 5,67 seconds of load of css images instead of 11,87 seconds (as u can see in the attachment 2.jpg)
in this way If u use smaller images u can have quite reasonable load time of the site. (using the cache!!)
</blockquote>You might want to consider the use of gifs in other CSS also. When you deleted the css related gifs, did you also ensure that they are deleted in the specifications in the corresponding CSS file? I think a missing gif, when still used in the CSS specifications can introduce its own problem.
Indeed there should be a reduction in time with what you have done. However, if you analyze the two summary images, you will note that there is also a dramatic reduction in the time for the “Total images” — even if there is almost the same kb of the site images (just a small reduction).
I was baffled by the total images kb size — almost 800kb??? I downloaded one of them, see attachment, and it appears that the images themselves were not optimized (compare the size of the original with the two other sizes that are almost the same sizes as the original (the reduction was needed for my optimization to be activated, using Coppermine PhotoGallery) : orig: greve (47.6kb: 290×189), t-greve(10.5kb: 289×188) and mini-greve (10.2kb: 286×185). Note the more than four-fold (4.5) reduction in kb with optimization, imagine how much more the total reduction would be, if you 16 images of the same sizes: for the same sizes, before and after optimization would be 762kb vs 168kb.
I did the same analysis a long time ago comparing two sites that are almost identical, except for features that I thought would help optimize the site — I got a very dramatic variation in the differences — from a great difference (in favor of what I thought was the more optimize, to almost equal to even a slight reverse in ratio.
<em>@camillo290182 117941 wrote:</em><blockquote>
This is only one solution for have smaller load time but there are a lot of things to do. Can joomlart give us a solution for that big problem?? this template is not professional whith this load time!!can u help us please??
thanks again, Camillo</blockquote>
What I noticed is that you have quite a few modules, videos, streaming application, two slideshows, a banner, tag cloud and hot topic, plus “Latest events”. From my simplified Sandbox, the randomized Hot Topic and “Latest events” modules are the slowest to load The reason for these is that the have to be compiled. I unpublished all video and multimedia because they are known to slow the page, and more so if they are from external sources — because you are also dependent on the traffic in the outside servers. Streaming application and slideshow modules are also frowned upon in shared server hosting services because they are CPU hoggers.
One thing you can do about the video on the top right is an image capture (and do optimization on the image captured). Instead of linking directly to the video, use the captured image (optimized) as navigational link to point to the video.
You can try unpublishing the external based modules, one at a time and find out how much reduction in time you will gain. Based on this, you might consider which one to keep, or perhaps consider placing them in specific pages. Remember that the Home page is already too information rich. More than likely, a visitor is likely to focus only in specific modules or sections. For example, when I visit the New York times, I ignore more than 80% of the articles.
Obviously, the above attempts are skirting the 800-pound gorrilla — the role of the script itself. It is not only the JA News but the modular foundation of Joomla itself. The layout is as important (too many divs) from my initial static page layouting showed that complex nested tabs (or divs) can slow down a page even with the same content.
I read the Yahoo discussions on optimization and the above issues may require a radical overhaul of the template and Joomla scripts. However, I do not have the scripting expertise to tackle the said modification.
Cornelio
- Arvind Chauhan Moderator
Arvind Chauhan
- Join date:
- September 2014
- Posts:
- 3835
- Downloads:
- 74
- Uploads:
- 92
- Thanks:
- 1240
- Thanked:
- 1334 times in 848 posts
March 16, 2009 at 9:15 pm #296323Great explanation effort by cgc0202.
It would be unfair to blame the template for the slow performance of the site. After running the site through http://analyze.websiteoptimization.com, The site shows 66 HTTP requests, 542780 bytes of site size and page loading time of 121 secs (@ 56 K). just to understand what makes the site slow, here are some observations:
A). 66 HTTP Request = 47 images + 8 JS + 10 CSS files + 1 HTML
47 images = 26 HTML images (user added images) = 77.8 secs (@ 56 K)
= 21 CSS images (template added images) = 6.6 secs (@ 56 K).Remark :
- You have already removed css images from typo.css and other css files > Good.
- HTML images are added / modified by user > One needs to reduced those (out of total loading time of 121 secs 77 secs are just for HTML images). Certainly images are going to weigh something > can not blame the template for it.
B ). 542780 bytes site size = 21378 bytes > HTML + 377237 bytes > Total images + 104816 bytes > JS + 39349 bytes CSS files.
Image Size : HTML size is 365160 bytes out of total page size of 542780 bytes.> Needs to be reduced.
JS file size and CSS file size can be decreased by removing white spaces and by removing comments. an easy way of doing it is available online use the following tools for the same :
http://javascriptcompressor.com/
http://www.cssoptimiser.com/index.phpbut remember to backup your original files and also once optimized using the above methods your css and js files will be unreadable by human brain.
Lets see an example of css optimization.
here is an example css from Ja_pyrite template.css file[PHP]/* FORM
——————————————————— */
form {
margin: 0;
padding: 0;
}form label {
cursor: pointer;
}input, select, textarea, .inputbox, .button {
font-family: inherit;
font-size: 100%;
}.inputbox {
padding: 2px;
border: 1px solid #CCCCCC;
background: #FFFFFF;
color: #333333;
font-size: 100%;
}
[/PHP]and here is the optimized css file after running it through online css optimizer at http://www.cssoptimiser.com/optimize.php
[PHP]form{margin:0;padding:0}form label{cursor:pointer}.button,.inputbox,textarea,select,input{font:100% inherit}.inputbox{padding:2px;border:1px solid #ccc;background:#fff;color:#333;font-size:100%}[/PHP]
There is a optimization of 46.28 % just for those few lines of code. But can you make sense out of it? However, This process does save few secs off your loading time. Remember to save your original file before optimizing it.
C). Reducing HTTP requests :
1. Decreasing CSS images : Already done. 🙂
2. Decreasing HTML images : Difficult but may be required to cut down on loading time.
3. Reducing JS files : Loss of functionality.
4. Reducing CSS files : Loss of template functionality.Advance Options to decrease HTTP requests:
Look at the Page source. In firefox > view> Page Source.
Locate these lines :
[PHP]<link rel=”stylesheet” href=”/uniriotII/templates/ja_teline_ii/css/ja.news.fp.css” type=”text/css” />
<link rel=”stylesheet” href=”/uniriotII/templates/ja_teline_ii/css/ja.news.css” type=”text/css” />[/PHP]Did you observer that both the css files are loaded from the same folder in the template directory? Why not call them by using one command? That saves 1 HTTP request. Similarly,
[PHP]<script type=”text/javascript” src=”/uniriotII/media/system/js/mootools.js”></script>
<script type=”text/javascript” src=”/uniriotII/media/system/js/caption.js”></script>[/PHP]Same folder : media/system/js/ this saves 1 HTTP request.
[PHP]<script type=”text/javascript” src=”/uniriotII/modules/mod_globalnews/scripts/slider.js”></script>
<script type=”text/javascript” src=”/uniriotII/modules/mod_globalnews/scripts/scroller.js”></script>[/PHP]1 HTTP request saved here.
[PHP]<link rel=”stylesheet” href=”http://www.uniriot.org/uniriotII/templates/system/css/system.css” type=”text/css” />
<link rel=”stylesheet” href=”http://www.uniriot.org/uniriotII/templates/system/css/general.css” type=”text/css” />[/PHP]1 HTTP request saved here.
[PHP]<link rel=”stylesheet” href=”http://www.uniriot.org/uniriotII/templates/ja_teline_ii/css/editor.css” type=”text/css” />
<link rel=”stylesheet” href=”http://www.uniriot.org/uniriotII/templates/ja_teline_ii/css/template.css” type=”text/css” />
<link rel=”stylesheet” href=”http://www.uniriot.org/uniriotII/templates/ja_teline_ii/css/ja.news.css” type=”text/css” />[/PHP]2 HTTP requests saved here.
How to call them with one command? Below is the example of single command to call the above 3 css files.
[PHP]<link rel=”stylesheet” href=”http://www.uniriot.org/uniriotII/templates/ja_teline_ii/css/editor.css,template.css,ja.news.css” type=”text/css” />[/PHP]
Replace those three lines of code with this single code and its done.
So you can save about 6 HTTP requests by calling your scripts / css files together. If you are advance Joomla guy, you can call them together and save more http requests.
so you save 4 out of 10 css HTTP requests, and 2 out of 8 JS HTTP requests, without messing up with the files of your joomla.
Now this will certainly help in decreasing the loading time, but it will not compress your CSS or JS files.
Advance options to minify / compress CSS, JS, HTML files :- Use of minify script from Google code (works independent of joomla, minor tweaks required for .htacess and index.php of template) . http://code.google.com/p/minify/wiki/UserGuide
- Minify4Joomla – Joomla component using the above script . http://extensions.joomla.org/extensions/site-management/cache/7183/details
- Many other commercial options available on Joomla Extension Directory. http://extensions.joomla.org/extensions/site-management/cache
Remember to backup your sites and files – before you try anything. Some of these components are known to break sites (User site development dependent – Not to blame the developers of individual scripts please).
Not satisfied? Need Supersonic Joomla?
Combine all your css files in one file (requires editing hell lot of files to point to the single css file, try this if you can remember all the files you have edited).
Combine All JS files in one – Phew….. (Combining your CSS or JS in one file each, decreases the http requests by large but the file becomes too heavy).
Shift the CSS to top and JS files to the bottom of your site – that gives a progressive loading.
Use of CSS sprites (Yahoo Favourite) : here are the links to know more about CSS sprites and its implementation.http://websitetips.com/articles/css/sprites/
http://css-tricks.com/css-sprites-what-they-are-why-theyre-cool-and-how-to-use-them/Its unfair to blame Joomla framework or templates for slow / poor performance. If Joomla or Joomlart are to provide optimized files (without comments or white spaces), then no one would be able to understand them forget the thought of editing them to our taste.
Will be refining this article…. there is so much to add here.
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 17, 2009 at 11:23 pm #296546Hi drarvindc,
Thanks for the response. I have been trying some of those optimization procedures last year, e.g, integrating the CSS files, but got side tracked, with layout issues.
If you will be so kind, I would be very interested to continue the discussion, more systematically. For example, we could take one issue per thread.
Java script and optimization
CSS and strategies for optimization
etc.Since I have no scripting background at all, I would approach from the perspective of a novice. I will post my take on the issue, and perhaps you and others with more experience and background help enlighten us.
Cornelio
March 18, 2009 at 9:20 am #296664hi all, thanks for the responces.
I continue to think that there is something wrong with the template. I tried to optimiza the css and java scripts but the load time changed only of 1 second.
i find a little solution obtaining 10 seconds of better load time.
in the index.php i moved some code after the head and it works very better in load time
[PHP]<head>
<link rel=”stylesheet” href=”<?php echo $tmpTools->templateurl(); ?>/css/template.css” type=”text/css” />
<!– Menu head –>
<?php $jamenu->genMenuHead(); ?>
<link href=”<?php echo $tmpTools->templateurl(); ?>/css/colors/theme<?php echo $tmpTools->getThemeForSection(); ?>.css” rel=”stylesheet” type=”text/css” />
</head>
<link href=”<?php echo $tmpTools->templateurl(); ?>/mootabs/mootabs1.2.css” rel=”stylesheet” type=”text/css” />
<jdoc:include type=”head” />
<?php JHTML::_(‘behavior.mootools’); ?>[/PHP]
i don’t think the problem is the big size of images or the number of css images. If u see these site with firebug, all the sites with these template, have a lot of time in loading the first byte. When u do a request of the firt page of the site, there are lot of seconds that the template wait for something ….for what?? where is the problem????? Why the site wait 16 seconds before having an answer???? Other thing is the total load time that dipends from the images and the http request.s. Why is so slow in loading the first byte???
In the attachment you can see what i mean. Whit the change of code that i made (disabling high slide) the situation is better.(you can see the attachment). With the cache the load time of the first byte (with the cange that i made) become 5-8 seconds.
Please can joomlart help me(us)??? i must publicate these site on monday but i can’t have these performance on such site. (there are thousand visitors in a day, i can use the cache in a good way but not always!!).
thanks
Arvind Chauhan ModeratorArvind Chauhan
- Join date:
- September 2014
- Posts:
- 3835
- Downloads:
- 74
- Uploads:
- 92
- Thanks:
- 1240
- Thanked:
- 1334 times in 848 posts
March 18, 2009 at 7:29 pm #296741just had another look at the optimizaion report of your site. You also have two NOT FOUND files. NOT FOUND requests also have negative impact on joomla performance as the server and browser has to take time to know what to do with the not found queries.
Further, your html size has increased from 21378 bytes to 83503 bytes, total page size from 542780 bytes to 586088 bytes and load time from 121 secs to 130 secs, since i saw your site in past 2 days.
I would like to have a personal look into your site to really evaluate and suggest concrete options or ways out. and since you have already optimized your css files, i would request a look at the backup css files, just to see from where these two NOT FOUND errors are being thrown.
<blockquote>General:
Watch out for errors in your template. When you reference a file like arrow.gif and this file is non-existent, the performance of your server will drop immensly.</blockquote>the above quote is from the Joomla.org forum thread http://forum.joomla.org/viewtopic.php?t=50278
Have a look at it, and if possible i would like to have access to your ftp to come up with concrete suggestions.
imsleepy Friendimsleepy
- Join date:
- January 2009
- Posts:
- 451
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 94
- Thanked:
- 45 times in 1 posts
March 18, 2009 at 7:54 pm #296742Thanks so much for this thread. I am just starting a website with Teline II, been working on it for a month and the most frustrating part was the slow load time. I am going to use some of the ideas mentioned here to see if I can speed it up a bit.
Thanks again. I do believe this is one of the most educational threads I have seen and much of the ideas presented here could be used to optimize other templates as well I am sure.
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 18, 2009 at 10:01 pm #296754<em>@drarvindc 118713 wrote:</em><blockquote>just had another look at the optimizaion report of your site. You also have two NOT FOUND files. NOT FOUND requests also have negative impact on joomla performance as the server and browser has to take time to know what to do with the not found queries.
Further, your html size has increased from 21378 bytes to 83503 bytes, total page size from 542780 bytes to 586088 bytes and load time from 121 secs to 130 secs, since i saw your site in past 2 days.
I would like to have a personal look into your site to really evaluate and suggest concrete options or ways out. and since you have already optimized your css files, i would request a look at the backup css files, just to see from where these two NOT FOUND errors are being thrown.
the above quote is from the Joomla.org forum thread http://forum.joomla.org/viewtopic.php?t=50278
Have a look at it, and if possible i would like to have access to your ftp to come up with concrete suggestions.</blockquote>
Hi drarvindc,
The quote you gave has a bearing on one of the side questions I asked in another post. Just as missing gifs would slow the upload, won’t “DIVs and other CSS tags” in the script without their counter in the CSS cause similar slowdown?
Unless I have not found all the relevant CSS files, there are a number of “div and other CSS tags” that I did not find defined in the Teline II. That they are missing was evident when I created the correspondin tag in the css, I got the desired effect in the page layout.
I isolated the javascripts I found in the index.php, grouped in to three sets based on their location, and showed them here
Javascripts and Optimization
http://www.joomlart.com/forums/topic/javascripts-and-optimization/I have questions on javascripts based on what you stated in your first posts, I would be grateful if you care to comment on them. Some might sound silly but I have no background in scripting at all.
Thanks.
Cornelio
March 18, 2009 at 11:46 pm #296766i can’t give u the access for ftp, but if u think that it can be an help for you i can give the zip of the template and external css.
The problem here is: why ja teline II is so slow in loading the first byte, the first http request??(you can see that it spend a lot of time in loading the get uniriotII request whithout doing nothing!!!! as u can see using firebug (or other web tools)
can we have something that load a title of the page soon? something that inform the user that the site is loading. For me is not a problem that the site load in 20 seconds if the first byte load in 2-3 seconds. The problem is that the site load in 20 seconds and for 19 seconds there is no answer (this can be a problem because a user can leave the site)
IS POSSIBLE TO HAVE AN OFFICIAL ANSWER BY THE JOOMLART STAFF??? something that says one of the two solution
1) it’s a problem of your code so you have to resolve it
2) it’s a problem of jatelineII template and we are studying a solution for optimize itthanks Camillo,cooperation is power!!!
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 18, 2009 at 11:57 pm #296767<em>@camillo290182 118612 wrote:</em><blockquote>hi all, thanks for the responces.
I continue to think that there is something wrong with the template. I tried to optimiza the css and java scripts but the load time changed only of 1 second.
i find a little solution obtaining 10 seconds of better load time.
in the index.php i moved some code after the head and it works very better in load time
[PHP]<head>
<link rel=”stylesheet” href=”<?php echo $tmpTools->templateurl(); ?>/css/template.css” type=”text/css” />
<!– Menu head –>
<?php $jamenu->genMenuHead(); ?>
<link href=”<?php echo $tmpTools->templateurl(); ?>/css/colors/theme<?php echo $tmpTools->getThemeForSection(); ?>.css” rel=”stylesheet” type=”text/css” />
</head>
<link href=”<?php echo $tmpTools->templateurl(); ?>/mootabs/mootabs1.2.css” rel=”stylesheet” type=”text/css” />
<jdoc:include type=”head” />
<?php JHTML::_(‘behavior.mootools’); ?>[/PHP]
i don’t think the problem is the big size of images or the number of css images. If u see these site with firebug, all the sites with these template, have a lot of time in loading the first byte. When u do a request of the firt page of the site, there are lot of seconds that the template wait for something ….for what?? where is the problem????? Why the site wait 16 seconds before having an answer???? Other thing is the total load time that dipends from the images and the http request.s. Why is so slow in loading the first byte???
In the attachment you can see what i mean. Whit the change of code that i made (disabling high slide) the situation is better.(you can see the attachment). With the cache the load time of the first byte (with the cange that i made) become 5-8 seconds.
Please can joomlart help me(us)??? i must publicate these site on monday but i can’t have these performance on such site. (there are thousand visitors in a day, i can use the cache in a good way but not always!!).
thanks</blockquote>
camillo,
One problem that I noticed, you did not consolidate the CSS as suggested by drarvindc, in his first response. If I am not mistaken, I think the thumb rule is keep the CSS files at the top and the pertinent javascripts near the bottom of the file.
Could you do us a favor: Please provide a before and after of the changes that you made, just like drarvindc did in his first response?
It takes a lot of effort to compare a very large file to another that has been modified, especially complex PHP files.
Cornelio
Arvind Chauhan ModeratorArvind Chauhan
- Join date:
- September 2014
- Posts:
- 3835
- Downloads:
- 74
- Uploads:
- 92
- Thanks:
- 1240
- Thanked:
- 1334 times in 848 posts
March 20, 2009 at 11:33 am #296973Sorry took me long to reply :
Just to clear some point :
I did suggest placing css on top and JS at the bottom of page. But this suggestion was based on my research from joomla forums and google. I personally have not been able to pull it off fully myself.
- I do stand by calling multiple css files in one command and same with js. But it gets difficult when planning to call the files from different folders.
- The first step and easiest is to call css files or js files originating from a common folder. Only requires editing the index.php of template.
- To call multiple css files from various folders together may involve editing multiple files to correct the moved file’s path.
Css sprites, combining css together or combining js together is for advanced Joomla guys. Hacking files to make these work also necessitates keeping a track of files changed and blocks changed. Keeping track of such files / blocks for so many sites isn’t all that practical.
The Steps which i fully understand, employs, support and Recommend are as follows :
- Removal of unwanted / unused entries from css files (especially template.css and typo.css)
- Optimization of CSS and Compression of JS (using online tools).
- Assessment and removal of expendable modules.
- If using JCE, avoid JCE Utilities plugin. (that adds additional JS, CSS and increases HTTP request by over 15 and may be 25 at times).
- Deploy minify (google code). It works great.
This may please be read along with my first post, so as to ascertain what can work or what may not work on your sites. Always remember to take backups of files before you explore / exploit them.
Arvind Chauhan ModeratorArvind Chauhan
- Join date:
- September 2014
- Posts:
- 3835
- Downloads:
- 74
- Uploads:
- 92
- Thanks:
- 1240
- Thanked:
- 1334 times in 848 posts
March 20, 2009 at 11:50 am #296977<em>@cgc0202 118729 wrote:</em><blockquote>Hi drarvindc,
The quote you gave has a bearing on one of the side questions I asked in another post. Just as missing gifs would slow the upload, won’t “DIVs and other CSS tags” in the script without their counter in the CSS cause similar slowdown?
Unless I have not found all the relevant CSS files, there are a number of “div and other CSS tags” that I did not find defined in the Teline II. That they are missing was evident when I created the correspondin tag in the css, I got the desired effect in the page layout.
I isolated the javascripts I found in the index.php, grouped in to three sets based on their location, and showed them here
Javascripts and Optimization
http://www.joomlart.com/forums/topic/javascripts-and-optimization/I have questions on javascripts based on what you stated in your first posts, I would be grateful if you care to comment on them. Some might sound silly but I have no background in scripting at all.
Thanks.
Cornelio</blockquote>
Regarding your question 1.
<blockquote>won’t “DIVs and other CSS tags” in the script without their counter in the CSS cause similar slowdown? </blockquote>
I myself wasnt sure of answer to this and so i did consult my Joomla friends about this, they also feel that these missing Divs / tags, should pose a very little performance issue (but layout problems may be evident), when compared with missing image.
Question 2.
Regarding your questions on Javascripts, i can try to help. Dont bother about being silly. here everyone is naked in shower. Cant learn till we bang our heads.My objective while optimizing joomla for speed are limited :
1. Minimum editing of files.
2. Increase site speed by atleast 20-40 %. I use the gmail as benchmark – my sites should not take more time then the time taken to open the gmail inbox.
3. Decrease http requests as much as possible to decrease server load. It is must for me as, i have once received email from my hosting company asking me to cut down on server load.Put in your questions and lets see, if i cant answer someone else will surely do.
March 20, 2009 at 5:44 pm #297023hi all,
i found that the templates/system/css/general.css have a link to an image that was not on the directory of the template. I removed the code from the template for this image. I put all the css at the top of the page and all the js at the bottom of the page. Now the site load the first byte in 14.76 seconds(firebug) and 11.6 seconds (pingdoomtool). (we started our discussion whe the site loads in 28 seconds!!!). SO good work!!The problem to resolve is:
Why we have a bad reaction time?
What is doing the site when it receive the request (as u can see in the attachment)??
what is waiting for?Now I’ll try to remove portion of code and then I’ll try to find which is the problem!!
Suggestion??Stay tuned!
Camillo[PHP]<?php
// no direct access
defined( ‘_JEXEC’ ) or die( ‘Restricted access’ );
include_once (dirname(__FILE__).DS.’ja_vars_1.5.php’);?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”<?php echo $this->language; ?>” lang=”<?php echo $this->language; ?>”>
<head>
<link rel=”stylesheet” href=”<?php echo $tmpTools->templateurl(); ?>/css/template.css” type=”text/css” />
<link rel=”stylesheet” href=”<?php echo $tmpTools->templateurl(); ?>/css/ja.news.css” type=”text/css” />
<link rel=”stylesheet” href=”<?php echo $tmpTools->baseurl(); ?>templates/system/css/system.css” type=”text/css” />
<link rel=”stylesheet” href=”<?php echo $tmpTools->baseurl(); ?>templates/system/css/general.css” type=”text/css” />
<link rel=”stylesheet” href=”<?php echo $tmpTools->templateurl(); ?>/css/editor.css” type=”text/css” />
<link href=”<?php echo $tmpTools->templateurl(); ?>/mootabs/mootabs1.2.css” rel=”stylesheet” type=”text/css” /><!– Menu head –>
<?php $jamenu->genMenuHead(); ?>
<link href=”<?php echo $tmpTools->templateurl(); ?>/css/colors/theme<?php echo $tmpTools->getThemeForSection(); ?>.css” rel=”stylesheet” type=”text/css” /></head>
<jdoc:include type=”head” />
<?php JHTML::_(‘behavior.mootools’); ?>
<body id=”bd” class=”<?php echo $tmpTools->getParam(JA_TOOL_SCREEN);?> fs<?php echo $tmpTools->getParam(JA_TOOL_FONT);?>” >
<a name=”Top” id=”Top”></a>
<ul class=”accessibility”>
<li><a href=”<?php echo $tmpTools->getCurrentURL();?>#ja-content” title=”<?php echo JText::_(“Skip to content”);?>”><?php echo JText::_(“Skip to content”);?></a></li>
<li><a href=”<?php echo $tmpTools->getCurrentURL();?>#ja-mainnav” title=”<?php echo JText::_(“Skip to main navigation”);?>”><?php echo JText::_(“Skip to main navigation”);?></a></li>
<li><a href=”<?php echo $tmpTools->getCurrentURL();?>#ja-col1″ title=”<?php echo JText::_(“Skip to 1st column”);?>”><?php echo JText::_(“Skip to 1st column”);?></a></li>
<li><a href=”<?php echo $tmpTools->getCurrentURL();?>#ja-col2″ title=”<?php echo JText::_(“Skip to 2nd column”);?>”><?php echo JText::_(“Skip to 2nd column”);?></a></li>
</ul>
<div id=”ja-wrapper”>
<!– BEGIN: HEADER –>
<div id=”ja-headerwrap”>
<div id=”ja-header” class=”clearfix”>
<?php
$siteName = $tmpTools->sitename();
if ($tmpTools->getParam(‘logoType’)==’image’) { ?>
<h1 class=”logo”>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
</h1>
<?php } else {
$logoText = (trim($tmpTools->getParam(‘logoText’))==”) ? $config->sitename : $tmpTools->getParam(‘logoText’);
$sloganText = (trim($tmpTools->getParam(‘sloganText’))==”) ? JText::_(‘SITE SLOGAN’) : $tmpTools->getParam(‘sloganText’); ?>
<h1 class=”logo-text”>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $logoText; ?></span></a>
</h1>
<p class=”site-slogan”><?php echo $sloganText;?></p>
<?php } ?>
</div>
</div>
<!– END: HEADER –>
<!– BEGIN: MAIN NAVIGATION –>
<div id=”ja-mainnavwrap”>
<div id=”ja-mainnav” class=”clearfix”>
<?php $jamenu->genMenu (0); ?>
</div>
</div>
<?php if ($hasSubnav) { ?>
<div id=”ja-subnavwrap”>
<div id=”ja-subnav” class=”clearfix”>
<?php $jamenu->genMenu (1,1); ?>
</div>
</div>
<?php } ?>
<!– END: MAIN NAVIGATION –>
<div id=”ja-containerwrap<?php echo $divid; ?>” class=”clearfix”>
<div id=”ja-container”>
<div id=”ja-container-inner” class=”clearfix”>
<!– BEGIN: CONTENT –>
<div id=”ja-content”>
<div class=”ja-innerpad clearfix”>
<jdoc:include type=”message” />
<?php if(!$tmpTools->isFrontPage()) : ?>
<div id=”ja-pathway”>
<jdoc:include type=”module” name=”breadcrumbs” />
</div>
<?php endif ; ?>
<div id=”ja-current-content”>
<?php if(!$tmpTools->isFrontPage()) : ?>
<jdoc:include type=”component” />
<?php endif; ?>
<!– BEGIN: JAZIN –>
<?php if($tmpTools->isFrontPage()) : ?>
<div id=”jazin-fp”>
<jdoc:include type=”modules” name=”ja-news” style=”raw” />
</div>
<?php endif; ?>
<!– END: JAZIN –>
</div>
<?php
$spotlight = array (‘user8′,’user9’);
$botsl = $tmpTools->calSpotlight ($spotlight,$tmpTools->isOP()?100:99.9);
if( $botsl ) {
?>
<!– BEGIN: BOTTOM SPOTLIGHT –>
<div id=”ja-botsl” class=”clearfix”>
<?php if( $this->countModules(‘user8’) ) {?>
<div class=”ja-box<?php echo $botsl[‘user8’][‘class’]; ?>” style=”width: <?php echo $botsl[‘user8’][‘width’]; ?>;”>
<jdoc:include type=”modules” name=”user8″ style=”xhtml” />
</div>
<?php } ?>
<?php if( $this->countModules(‘user9’) ) {?>
<div class=”ja-box<?php echo $botsl[‘user9’][‘class’]; ?>” style=”width: <?php echo $botsl[‘user9’][‘width’]; ?>;”>
<jdoc:include type=”modules” name=”user9″ style=”xhtml” />
</div>
<?php } ?>
</div>
<!– END: BOTTOM SPOTLIGHT –>
<?php } ?>
<?php if($this->countModules(‘banner’)) : ?>
<!– BEGIN: BANNER –>
<div id=”ja-banner”>
<jdoc:include type=”modules” name=”banner” />
</div>
<!– END: BANNER –>
<?php endif; ?>
</div>
</div>
<!– END: CONTENT –>
<?php if ($ja_left || $ja_right || $ja_masscol) { ?>
<!– BEGIN: COLUMNS –>
<div id=”ja-colwrap”>
<?php if ($ja_masscol) { ?>
<!– BEGIN: MASSCOL –>
<div id=”ja-colmass” class=”clearfix”>
<div class=”ja-innerpad”>
<jdoc:include type=”modules” name=”user5″ style=”xhtml” />
<?php if ($this->countModules(‘user6’)) : ?>
<script type=”text/javascript”>
window.addEvent(‘load’, initmootabs);
function initmootabs() {
myTabs1 = new jamootabs(‘ja-tabs’, {
<?php echo $ja_mootabs_options; ?>
});
}
</script>
<div id=”ja-tabswrap”>
<div id=”ja-tabs” class=”clearfix”>
<div class=”ja-tab-panels”>
<jdoc:include type=”modules” name=”user6″ style=”xhtml” />
</div>
</div>
</div>
<?php endif; ?>
<jdoc:include type=”modules” name=”user7″ style=”xhtml” />
</div>
</div>
<!– END: MASSCOL –>
<?php } ?>
<div id=”ja-cols” class=”clearfix”>
<?php if ($ja_left) { ?>
<div id=”ja-col1″>
<div class=”ja-innerpad”>
<jdoc:include type=”modules” name=”left” style=”xhtml” />
</div>
</div>
<?php } ?>
<?php if ($ja_right) { ?>
<div id=”ja-col2″>
<div class=”ja-innerpad”>
<jdoc:include type=”modules” name=”right” style=”xhtml” />
</div>
</div>
<?php } ?>
</div>
</div><br />
<!– END: COLUMNS –>
<?php } ?>
</div></div></div>
<!– BEGIN: FOOTER –>
<div id=”ja-footerwrap” class=”clearfix”>
<div id=”ja-footer”>
<jdoc:include type=”modules” name=”user3″ />
<jdoc:include type=”modules” name=”footer” />
<div class=”ja-cert”>
<jdoc:include type=”modules” name=”syndicate” />
</div>
</div>
</div>
<!– END: FOOTER –>
</div>
<jdoc:include type=”modules” name=”debug” />
<script language=”javascript” type=”text/javascript” src=”<?php echo $tmpTools->templateurl(); ?>/js/ja.script.js”></script>
<script language=”javascript” type=”text/javascript” src=”<?php echo $tmpTools->templateurl(); ?>/mootabs/mootabs1.2.js”></script><!–>
<style type=”text/css”>
.clearfix {height: 1%;}
img {border: none;}
</style>
<!–>
<!–>
<style type=”text/css”>
.clearfix {display: inline-block;}
</style>
<!–>
<?php if ($tmpTools->isIE6()) { ?>
<!–>
<script type=”text/javascript”>
var siteurl = ‘<?php echo $tmpTools->baseurl();?>’;
</script>
<!–>
<?php } ?>
</body>
</html>[/PHP]
Jump to forum