All the significant performance bottlenecks I've ever run into were I/ O related; either from the database, or from some horrendously huge- but-necessary file upload and/or data processing. When you start caring about how many asynchronous HTTP connections a browser can handle so that you can optimize your Javascript and CSS loading, it should be because your I/O bottlenecks are all but non-existent.
One thing you can do to optimize on the Cake side of things is to minimize the amount of data fetched from the db and sent to your view. When you have several complex model associations with various levels of recursion, you can sometimes be pulling a significant amount of unneeded data when doing a Model::findAll() or Model::findBy(). Check this out by calling debug() on those datasets, and see if you can reduce the data fetched to a minimum by resetting recursion levels, or setting dynamic associations using Model::bindModel() and Model::unbindModel(). The latter does introduce some extra overhead, but it may sometimes be preferable. From the db side, there are far too many people who don't understand the importance of proper indexes on read-heavy databases. Make sure your indexes aren't longer than they have to be, that you're indexing foreign keys, and that you know how your db engine processes multi- column indexes. If you're not very familiar with the topic, for MySQL I'd suggest reading: http://dev.mysql.com/doc/refman/5.0/en/multiple-column-indexes.html http://dev.mysql.com/doc/refman/5.0/en/mysql-indexes.html Don't be afraid to run your query through an analyzer (MySQL's EXPLAIN command, or similar for other dbs) to determine if your queries are being run efficiently. Database analysis and optimization is a field in and of itself, and constantly needs to be revisited during the evolution of your application. Well, that was my exp(2,n) cents. -J. On Apr 21, 11:08 am, "Jignesh Thummar" <[EMAIL PROTECTED]> wrote: > Thanks Joel. > > Actually, I'm doing performance in my application. Its entirely on CakePHP. > > Can you suggest me, which can help me to improve performance of my app? > Particularly i'm looking any performance related bottlenecks in development > using cakephp, which can help me to improve performance. > > Can you suggest me any guidelines for cakephp application development? May > be i could have missed some important things which can lead to performance > bottlenecks. > > Regards, > Jignesh > > On Mon, Apr 21, 2008 at 3:19 PM, Joel Perras <[EMAIL PROTECTED]> wrote: > > > Create a new layout with the contents of your header/footer > > combination (similar to your default layout), save it in app/views/ > > layouts, and in your controller's beforeRender() callback set $this- > > >layout = 'name_of_your_new_layout'; > > > Don't change the extensions. They're different for a reason. > > Don't worry about the 'impact on PHP'; there are hundreds of other > > bottlenecks that will slow your app down before you should start > > caring about this. > > > -J. > > > On Apr 21, 7:34 am, Jignesh Thummar <[EMAIL PROTECTED]> wrote: > > > In views/<controller_name> directory, i have two files for header and > > > footer respectively header.thtml and footer.thtml. > > > I want to include these two files in that particular controller's all > > > view files. > > > > If I change my file name from header.thtml to header.php, does it make > > > any performance impact on PHP? > > > I have tried to look on cachegrind.out file generated by Xdebug. And i > > > found something strange about this function call. > > > > Any help on this will be appreciated. > > > > Regards, > > > Jignesh --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
