Another reply to myself.

I ran into problems LazyLoading models from plugins with Matt Curry's
original version. Fortunately, lorenzo on GitHub made a branch that,
among other things, fixes that. You can find his version here:
http://github.com/lorenzo/lazy_loader/tree/master

I'm completely happy now. I did some more profiling and it clearly
works. Less code is being run, resulting is a cleaner and faster app.
Thanks Matt and Lorenzo!

- Nejra

On Jul 20, 6:28 pm, Nejra <[email protected]> wrote:
> It seems that I was a bit to quick in posting here. I just came across
> Matt Curry's LazyLoader plugin., whicht might very well be the thing
> I'm looking for :)
>
> - Nejra
>
> On Jul 20, 5:13 pm, Nejra <[email protected]> wrote:
>
> > Hi,
>
> > I'm doing some profiling on a prototype that uses some extensive
> > associations (the largest has 11 first level associations of different
> > kinds, which could become more).
>
> > When loading a model, Cake also loads all the associated models.
> > Normally this doesn't take too much time, but now it's the slowest
> > part of the process. The final result is intended for a heaviliy
> > visited site, so all optimizations are welcome.
>
> > Is there a way to stop Cake from loading all the associations until
> > needed by, for example, Containable, without hacking the core library?
>
> > If not, I've come up with three methods of avoiding the association
> > loading process. Anyone know of a better way?
>
> > 1. Cache resultsets and only load models (via loadModel()) when
> > needed. But caching all user-specific, filtered or differently loaded
> > resultsets could be even less ideal.
> > 2. View caching where possible.
> > 3. Making lite models with less associations for some pages. But that
> > would lead to redundant code,.
>
> > Thanks, any suggestion is appreciated.
>
> > - Nejra
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to