How can I improve the speed and performance of my web app?

My web application is currently developed using PHP’s CodeIgniter framework. I haven’t done any optimization whatsoever. How can I improve the overall speed and performance of it?

Thanks in advance!

Try searching for “Profiling” which will highlight the bottlenecks and from the information select one of the numerous “Driver Caching Classes”,

Have you tried Tools.Pingdom.com which gives a detailed breakdown of each page item’s time to load, file-size and detailed recommendations to reduce page loading times?

Have you tried Tools.Pingdom.com which gives a detailed breakdown of each page item’s time to load, file-size and detailed recommendations to reduce page loading times?

That is an good tool for this, in my experience. Also http://gtmetrix.com/ isn’t too bad, it compares a few.

Remember that the tools are not infallible. They’re useful, but you’re not required to do everything that they say, just like with validators. Use them for ideas or to find big issues, and correct them, if you’re so inclined.

1 Like

The slowest thing a computer can be asked to do is read a disk - that usually means database queries, though MySQL and all modern db solutions have mechanisms to cache the most frequent query results. But most of the time that’s going to be your biggest time sucker.

Frameworks and CMS’s attack this two ways. The first is to maintain cache’s of their own, especially through APC or memcache. The second is to maintain cache tables to hold frequently looked up data - this works because of the aforemention internal db caching, but also cache tables tend to be small. Small table, small query time.

Optimization of SQL is a subject of its own, involving things like maintaining proper field indexes and paying attention to the slow queries log.

Beyond that there’s Varnish, which is a caching system that sits between your PHP and the outside world, caching the results of the most frequently pooled pages. I’ve seen sys admins get good results with it even on notoriously slow PHP programs like Magento, but I haven’t used it extensively myself.

Then there’s the option of not using PHP in the first place. The fastest thing a webserver can do is serve a static file. With that in mind take care that your mod_rewrite rules (if you have them) are not passing requests for files PHP doesn’t need to serve out. Consider writing a end of script function that can take the outgoing HTML and save it to a static HTML file that the webserver can serve instead of using PHP. This is very practical for pages that update infrequently, though it takes some planning to implement.

Finally, get acquainted with the Network tab of your browser’s console. This tool ( I know its in Chrome, Firefox and Safari, I’d suspect IE 11+ has it to) gives you a graph of the times to load of all assets on the page - so you can use this to look for problem files and investigate why they’re taking so long.

2 Likes

Reduce the size of java script and CSS and make your website seo friendly that improve your speed and performance of web.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.