开发者

How to speed up joomla to be under 1s?

开发者 https://www.devze.com 2023-04-13 06:23 出处:网络
I activated joomla debug and got the following. and i can not understand why it takes almost 2 seconds to generate the page?

I activated joomla debug and got the following. and i can not understand why it takes almost 2 seconds to generate the page?

Application 0.000 seconds (+0.000); 0.99 MB (+0.989) - afterLoad
Application 0.145 seconds (+0.145); 6.75 MB (+5.758) - afterInitialise
Application 0.751 seconds (+0.605); 7.05 MB (+0.305) - afterRoute
Application 0.766 seconds (+0.015); 9.62 MB (+2.开发者_开发问答565) - afterDispatch
Application 1.376 seconds (+0.609); 10.04 MB (+0.426) - beforeRenderModule mod_search (Search)
Application 1.379 seconds (+0.003); 10.11 MB (+0.070) - afterRenderModule mod_search (Search)
Application 1.704 seconds (+0.325); 10.06 MB (-0.058) - beforeRenderModule mod_languages (Language)
Application 1.706 seconds (+0.002); 10.08 MB (+0.022) - afterRenderModule mod_languages (Language)
Application 1.993 seconds (+0.287); 10.15 MB (+0.077) - beforeRenderModule mod_menu (Main Menu EN)
Application 1.997 seconds (+0.004); 10.30 MB (+0.145) - afterRenderModule mod_menu (Main Menu EN)
Application 2.233 seconds (+0.236); 10.39 MB (+0.087) - afterRender

details: - Website hosted on debian with nginx+php-fpm+APC+mysql with low traffic 1-2 visitors a day

  • as you can see in the output it takes 2.233 seconds to generate the page, i think it has somenthing to do with the database, but I do not understand why...i even made the connection to mysql server using unix sockets:|

  • images and other static files load pretty fast(tested with firebug)


As Berndinox said - there are plenty of ways to help optimize. Are your images optimized? Is your template optimized? Is it a lightweight template? Is it loaded down with tons of queries? Without knowing what's going on with it - it's difficult to troubleshoot.

If you're loading tons of large weight images, it can take a bit to load. There are a lot of tools out there (for example, google page speed) that help to analyze things and give you a better idea of areas where you can modify, rules that may be running slowly (or are deprecated, etc), images that aren't optimized, etc. It can really help to make your template/site sleek.

Also, hosting is a MUST. You absolutely NEED a good host. A bad host will cause long delays for no reason other than an overloaded server. You didn't mention who your host is - so again, just something else we don't know so it's tough to answer.

Hope this stuff helps.


Don't know if you are still struggling with this - but best guess is the database. Did your debug output count the number of sql queries?

Have you tuned MySQL - set up the my.cnf with settings other than the out of the box my.cnf - perhaps using large.cnf or huge.cnf?

Do you log slow queries? If not then do so, if you do then check the log. It might be necessary to add a few additional indexes to the db tables to speed up some queries.

Have you tried mysqltuner.pl or tuning-primer.sh? These can help spot misconfigurations and provide advice about tuning cache sizes the number of connections etc. Are you connecting using MySQLi or plain MySQL connections from PHP?

PHP's memory limits can also play a part - check these in php.ini.

I'm sure I can come up with many more suggestions if needed.

0

精彩评论

暂无评论...
验证码 换一张
取 消