Re: What do you develop in (ide, text editor, etc.)?

2009-04-15 Thread jcorrea
VIM :) On Apr 15, 6:21 am, Teh Treag wrote: > I prefer emacs. Am I the only emacs user around here. > > On Feb 28, 3:14 pm, adam wrote: > > > > > I'm using Eclipse with PDT, but Dreamweaver for making layouts. --~--~-~--~~~---~--~~ You received this message becau

Re: making belongTo association to a third model

2009-03-20 Thread jcorrea
I do this a lot (not so much in Model::belongsTo but in bindModel (...)): class Model1 extends AppModel { ... var $belongsTo = array( 'Model2', 'Model3' => array('foreignKey' => false, 'conditions' => 'Model2.model3_id = Model3.id') ); ... } Then in the find you can do something like:

Re: Self-referencing foreign key

2009-03-17 Thread jcorrea
For a self-reference do something like: class MyModel extends AppModel { ... var $belongsTo = array('SelfReferenceName' => array('className' => 'MyModel', 'foreignKey' => 'self_reference_fields_id', ...)); ... } On 17 mar, 12:00, Miguel wrote: > How do I make a self-referencing association in m

Re: Performance different between cakephp 1.1 and 1.2

2009-03-16 Thread jcorrea
Having debug>0 make the application a lot slower. Personally i've found that having too many related models make cake load really slow. Profiling my applications i get render times of 20ms, queries arround 20 to 50ms but loading the related models may take 800ms. On Mar 16, 5:01 am, Miles J wrot

Re: CakePHP in Google Summer of Code

2009-03-12 Thread jcorrea
Why not do something about cake's performance? On 11 mar, 13:14, "Diego Caro A." wrote: > Hello everyone, >            today I went to a talk by Google Summer of Code[1], a > google program for open source projects. This program offers student > developers stipends to write code. > > Well, I wan

Re: Cake performance tips

2009-03-09 Thread jcorrea
I was trying to do that, but loading one model loads lots of other related models. That's why it take too long. On 6 mar, 19:50, Miles J wrote: > Well I use this technique, it only loads models that we need for that > current action. Cuts down the models tremendously. > > http://www.milesj.me/bl

Re: Cake performance tips

2009-03-06 Thread jcorrea
Profiling my applications give me some good insights about where our application is having bottlenecks. The slow methods within cake core are: 1. Loading models takes a lot of the time (85% of the total time), specifically at Model::__createLink 2. FormHelper::select with large lists Is there any