Re: Cake CPU hungry

2007-09-01 Thread thequietlab
Do you know that for sure? If you lets say load the Users model in AppController, then it is more then likely that *all* of your other models are loaded b/c they are somehow associated with User. In AppController I only turn on othAuth and afaik it doesn't load any models if authorization is

Re: Cake CPU hungry

2007-09-01 Thread Felix Geisendörfer
(i.e. 20 users holding down on your front page or some other action is very different from each of them doing different things) Yeah, I'm taking a closer look on xdebug, I will post some results if I manage to run it. Ups, I meant to write 'Holding down F5 on your front page here, but

Re: Cake CPU hungry

2007-09-01 Thread majna
For xdebug please read this pdf http://derickrethans.nl/files/phparch-xdebug-qa.pdf link from http://www.sitepoint.com/blogs/2006/04/20/php-frontend-for-xdebug-profiling/ Use linux and KCacheGrind. For windows:dwnload xdebug dll, and put in php/ext folder php.ini add:

Re: Cake CPU hungry

2007-09-01 Thread thequietlab
@majna thanks for the links. I just tried $persistModel and, at first page render I was extremely happy to see all the models cached but then when I refreshed I got this : Warning (2): Invalid argument supplied for foreach() [CORE\cake\libs \object.php, line 239] Object::__openPersistent() -

Re: Cake CPU hungry

2007-09-01 Thread majna
This persistModel tip was for cake 1.1.x and it works well. 1.2 has problem with behaviours and persistModel. Report ticket? mod_rewrite is a must have, I know :) On Sep 1, 9:37 pm, thequietlab [EMAIL PROTECTED] wrote: @majna thanks for the links. I just tried $persistModel and, at first

Re: Cake CPU hungry

2007-08-31 Thread [EMAIL PROTECTED]
ab -n 1000 -c 20 means that you have 20 concurrent users making 1000 requests. The important part here is the concurrent bit. There's a wide variety of things you can do to optimise your controller, which are way beyond the scope of a single post, especially since you don't really say anything

Re: Cake CPU hungry

2007-08-31 Thread majna
try profiling with xdebug, use var $persistModel = true; in controller set debug to 0, cache views if u can, or just query results, persistent mysql connection , avoid var $uses() ClassRegistry may help sometimes do not use mod_rewrite On Aug 31, 3:46 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]

Re: Cake CPU hungry

2007-08-31 Thread thequietlab
thanks for your answers, @Simon ab -n 1000 -c 20 means that you have 20 concurrent users making 1000 requests. The important part here is the concurrent bit. ok, sorry I said it wrong - I know what does it mean but I'm not sure what should be the values to simulate traffic at a range like

Re: Cake CPU hungry

2007-08-31 Thread Felix Geisendörfer
I'm using expects(), it's pretty handy. My problem might be loading lot of models but still 'pages' doesn't load any models. Do you know that for sure? If you lets say load the Users model in AppController, then it is more then likely that *all* of your other models are loaded b/c they are