On Jun 7, 2008, at 8:18 AM, Femi Taiwo wrote:

> Hi,
> Here a quick 4-step primer to get better performance in cake
>
> 1. Specify var $recursive = 0; in your app/app_model.php
>     This will cut off all automatic calls to hasMany& haBtm  
> relationships by default. three-quarters of the time, I don't want  
> those results - I simply need the belongsTo bindings.
>
> 2. Use the Containable behavior 
> http://cakebaker.42dh.com/2008/05/18/new-core-behavior-containable/
> With that you can easily set the models to pull, the level of  
> recursion..
>
> 3. Use Wincachegrind and Xdebug to test after.
>
> 4. Avoid using so many App::import('Model',$modelName) in your  
> components where possible.

I've also seen a jump when I put the rewrite instructions in my apache  
config rather than the .htaccess file.

-- John







> Dr. Tarique Sani wrote:
>>
>> On Sat, Jun 7, 2008 at 5:36 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED] 
>> > wrote:
>>
>> I have noted the same thing of Hermann.
>> I use Xdebug and Wincachegrind.
>> And I have noted that the problem is exactly the presence of many
>> linked models in the application.
>>
>> Great Start -  What you really mean that your application is  
>> running too many un-needed queries and handling too much data.
>>
>> The solution to this is using the Containable behavior see 
>> http://cakebaker.42dh.com/2008/05/18/new-core-behavior-containable/
>>
>> I'm a newbie in Cake but I think that a post about "The Things to do
>> to get the best permorfance in cake" could be useful for the person
>> like me.
>>
>> Not exactly in those words but there are posts about it out there  
>> and like any other programming there can't be any one true solution  
>> for best performance... you have to tailor your application  
>> accordingly
>>
>> Perhaps you can write a post on how you optimized your application.
>>
>> Cheers
>> Tarique
>>
>> -- 
>> =============================================================
>> Cheesecake-Photoblog: http://cheesecake-photoblog.org
>> PHP for E-Biz: http://sanisoft.com
>> =============================================================
>>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to