-
AuthorPosts
-
jooservices Friend
jooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
May 26, 2015 at 11:38 am #206640Hi there
There are so many topics to ask about how to optimize website. Actually you CAN’T do it except you know how to work on it or hire 3rd company.At first we’ll try to understand how does website work.
#1 – Client request to server : We’ll need n1 time to send and receive client request to server. If user network in slow, it’ll take bit time.
#2 – Server receive request and process it
—- Process to work with data : Server will need n2 time to work with this. If your source code is not optimized or server under heavy usage it’ll take bit time.
—- Respond data
#3 – Client receive data: If client network in slow than of course it’ll take bit time to receive.
—- If respond data bit huge. it’ll take bit time to receive
—- Than render into browser. If respond data is complicate . Browser will take bit time to renderOk ! Now we can see what can we do: #2 and half of #3
For #2
— Optimize source code: Reduce unneeded processes
Joomla! is an CMS than of course it’ll included tons of thing for multi purpose. But if your site need to do optimize than you’ll need to know WHAT ARE YOUR EXACTLY WANT ? If your site don’t need to use bbcode ( opcode ) than why you need to use these kind of plugins even core plugins. Just uninstall it.
And lots of thing you can do base on your site requirements !
— Optimize respond data: Most users just leave it for 3rd plugin like compress CSS / JS. But you have no idea how it works and is it really good as it’s ?Compressor only do merge and minify files. For sample we have 5 KB x 10 files.
If we respond all it. Than browser will need download 10 files. It’ll take bit longer time. But if we merge and compress it. For sample we have one file with 30 KB ( instead 50 KB ). Ya ! Just only one request .BUT. That’s not true optimize ! And infact it would case more troubles with conflicting.
Let try sample with css
template.css ( template css file )a {color: red}
theme.css ( theme layer css file )
a {color: blue}
Why do you need keep these css lines ? theme.css will override template.css ! Than… optimize work is: Inspect these thing and remove all unneeded ! Can 3rd can do it in right way ? Yes ! But as far i know no 3rd do it yet .
And override with priority !
For sample we have.div1 .div2 .div3 a.optimize {color:red;}
If you know your site and know there is no need for css priority than you can optimize this
a.optimize{color:red};
No need complicate css selector.
With all above can help us:
– Reduce css / js file size
– Reduce complicate that cause browser slow down to renderThere are lots of users just only use 3rd plugin to do compress and of course they’ll have 1 file with ~100KB . It’s huge !!! Do optimize for each file first !!! Or accept with 100KB “optimized”.
— Optimize caching: It will help your server not be overload !
— CDN: If your target user located in Asian. Than why you leave your server under American ? . CDN would help do that.
— Optimize server config: As sysadmin they should know some trick / configuration to optimize server work as well as specific cases !There are stil tons of thing we can do for optimizing . But we need to know / understand it in root cause if we want to do it byself. Or just leave for 3rd developer 🙂
3rd extension can help you but for very basic thing ! We can’t expect true optimize thing with it .!Thank you,
Viet Vujooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
September 27, 2015 at 3:26 pm #693119Here is a story in real work how to optimize website.
Specially for Teline VStory:
I have received project migrate Joomla! 1.5 to Joomla! 3.4 with Teline V and around 40.000 articles .
Migrate is simple one but after migrated and with Joomla! 3.4 site extreme slow. It take around 30 second to load site.
Permission: Speed up it. ( Most of user will call it’s optimize task ).There tons of users will think about css / js compress & enable cache. Yup. It’s not wrong, but it’s not what’s exactly optimize need to do. It’s very very very tiny thing !!!
You should know what’s slowing before do optimize. Right ? How can we do something but we do not know what’s it ?
In this specific case you’ll need think about server side instead client side.
40.000 records would bit large !By use basic Joomla! Debug system we’ll get very useful information
https://www.dropbox.com/s/1ewtwiiy5lgw1o3/2015-09-27_22-00-53.png?dl=0
mod_acm / mod_custom & mod_articles_categories will cause hurt with slow respond.
Now please consider if you stil want do Optimize job by yourself or assign it to developer !
We already know what’s slowing us. Now you’ll need inspect into these module to see what’s going on !
I found
– mod_articles_categories in Teline V have some override layouts and hurt memory because resize image but didn’t release resource.
– mod_acm same ( they are used same layouts )And yes. some queries duplicate and / or no caching. I’ll talk about this in late.
Optimize above code than we’ll save a little.
But site still slow ?
– Time to check into MySQL. You’ll see some duplicated queries. Inspect into code than we’ll know what’s going here.
Let draw this picture in whole view.– You have cache enabled
– You have 10 instance module A for different purpose
– When module A render.
— Queries into database to get record
— Process with return data
— Render into html
— Cache for next timeWhat’s missed here !!!
— Queries into database to get recordFor first time load ( when no cached ). For 10 instances of module A, it’ll do 10 times queries.
What if in this 10 queries we have 8 queries are same & 2 different . So we have wasted 7 queries !!! Woh woh !!!
Cache cache it now !!!Look like we’ll need do some core hacking. Not only inside Teline but also in whole Joomla!
Is it enough ?
No !!!
As we did we only optimized for
– Release resource after used
– CachingBut for first time loading ( no cache ) it’s still really heavy. So what’s next
Check what’s slowed in MySQLCopying to tmp table extremely slow.
Now you’ll need sysadmin for this and maybe also need Database System Administrator.
– Optimize MySQL
tmp_table_size
max_heap_table_size
– Increase more RAM and change MySQL tmp to RAM. Yup ! Sysadmin job.After applied it’ll better a little bit.
What else we can do ?
Apache !Any sysadmin will know Nginx is lighter than Apache and in some case Nginx have Cache system better than Apache.
So … what can we do ?Nginx will receive request.
If it’s php than forward to Apache to process. Apache return and Nginx cache it for next time and respond.
If it’s static files Nginx process ( faster than Apache ) and also caching
The respond also provide header to force web browser cache it.Yup !
That’s some work we can do in optimize at server side.
So … Do not assume optimize is something just like click turn on and done !
Thank you,
Viet Vujooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
September 27, 2015 at 3:26 pm #749807Here is a story in real work how to optimize website.
Specially for Teline VStory:
I have received project migrate Joomla! 1.5 to Joomla! 3.4 with Teline V and around 40.000 articles .
Migrate is simple one but after migrated and with Joomla! 3.4 site extreme slow. It take around 30 second to load site.
Permission: Speed up it. ( Most of user will call it’s optimize task ).There tons of users will think about css / js compress & enable cache. Yup. It’s not wrong, but it’s not what’s exactly optimize need to do. It’s very very very tiny thing !!!
You should know what’s slowing before do optimize. Right ? How can we do something but we do not know what’s it ?
In this specific case you’ll need think about server side instead client side.
40.000 records would bit large !By use basic Joomla! Debug system we’ll get very useful information
https://www.dropbox.com/s/1ewtwiiy5lgw1o3/2015-09-27_22-00-53.png?dl=0
mod_acm / mod_custom & mod_articles_categories will cause hurt with slow respond.
Now please consider if you stil want do Optimize job by yourself or assign it to developer !
We already know what’s slowing us. Now you’ll need inspect into these module to see what’s going on !
I found
– mod_articles_categories in Teline V have some override layouts and hurt memory because resize image but didn’t release resource.
– mod_acm same ( they are used same layouts )And yes. some queries duplicate and / or no caching. I’ll talk about this in late.
Optimize above code than we’ll save a little.
But site still slow ?
– Time to check into MySQL. You’ll see some duplicated queries. Inspect into code than we’ll know what’s going here.
Let draw this picture in whole view.– You have cache enabled
– You have 10 instance module A for different purpose
– When module A render.
— Queries into database to get record
— Process with return data
— Render into html
— Cache for next timeWhat’s missed here !!!
— Queries into database to get recordFor first time load ( when no cached ). For 10 instances of module A, it’ll do 10 times queries.
What if in this 10 queries we have 8 queries are same & 2 different . So we have wasted 7 queries !!! Woh woh !!!
Cache cache it now !!!Look like we’ll need do some core hacking. Not only inside Teline but also in whole Joomla!
Is it enough ?
No !!!
As we did we only optimized for
– Release resource after used
– CachingBut for first time loading ( no cache ) it’s still really heavy. So what’s next
Check what’s slowed in MySQLCopying to tmp table extremely slow.
Now you’ll need sysadmin for this and maybe also need Database System Administrator.
– Optimize MySQL
tmp_table_size
max_heap_table_size
– Increase more RAM and change MySQL tmp to RAM. Yup ! Sysadmin job.After applied it’ll better a little bit.
What else we can do ?
Apache !Any sysadmin will know Nginx is lighter than Apache and in some case Nginx have Cache system better than Apache.
So … what can we do ?Nginx will receive request.
If it’s php than forward to Apache to process. Apache return and Nginx cache it for next time and respond.
If it’s static files Nginx process ( faster than Apache ) and also caching
The respond also provide header to force web browser cache it.Yup !
That’s some work we can do in optimize at server side.
So … Do not assume optimize is something just like click turn on and done !
Thank you,
Viet Vu -
AuthorPosts
This topic contains 3 replies, has 1 voice, and was last updated by jooservices 9 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum