On Wed, Mar 4, 2009 at 4:17 PM, Miles J <[email protected]> wrote: > > Use containable instead of recursive. Thatll cut down a ton of > unnecessary queries. > > My app currently has about 30 models and 40 database tables, all using > a ton of HABTM relations and it loads within 1 second.
I'll second that. Containable makes for a much simpler task of getting just what you want and not having to worry too much about whether a recursive level that's necessary for one model will pull in 10 others, as well. Also, run with debug = 2 to check what queries are being run, though set that to 0 when you want to test for speed. And, I should mention that I resolved an ugly slow-down in one app by realising that the problem was with Firebug, not Cake. Make sure you're profiling the right thing. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
