What debug level do you have set in core.php? I've got a site right now with 38 models (some are join models). One of my models is very basic but HABTM to many of the others. I created methods in AppController specifically for certain queries from it, so I could ensure that $recursive was always set to -1. At one point, investigating some issue, I did a debugger::log($data) and found it dumped more than 9MB. It was ridiculous. Definitely watch out for stuff like that. When you get up over more than a handful of models, make sure to be really careful running queries from any models with a lot of HABTM.
On Mon, Jan 5, 2009 at 9:44 PM, Troy Schmidt <[email protected]> wrote: > > Yes I think it is HABTM on HABTM that causes the problem. But no one > has any comment on the performance hit seen by bindModel? If there is > any. > > On Jan 4, 8:48 pm, Webweave <[email protected]> wrote: >> What do you mean "never runs" ? Do you mean it times out, or dies, or >> what ? >> >> On Jan 4, 4:32 pm, Troy Schmidt <[email protected]> wrote: >> >> > I have a database of 20 tables and several belongsTo, hasMany, and >> > HABTM relationships. When I have all my relationships loaded into the >> > models and turned on the program never runs. When I take out two of >> > the HABTM that I will rarely use or can write a custom bindModel to >> > run, then the application runs, but on viewing one page loads all the >> > models into memory (or at least it seems as such since it caches all >> > the tables). >> >> > Now I went through and aggressively took out any associations that I >> > didn't think would be used often. The remainder I plan on using >> > bindModel as needed to load them. My question is does anyone know >> > what the performance ramifications are to this model? Should I let it >> > load all of them and keep the associations loading essentially the >> > entire application? What kind of performance hit is there on >> > bindModel versus setting it in the model? And also does bindModel >> > offer any caching to it or does it build it all from scratch every >> > time? > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
