>
>> (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 I 
think you got that. Yeah I'm currently looking into getting xdebug to 
run myself - you don't happen to use OS X for development so you could 
share your findings ^^?
> In AppController I only turn on othAuth and afaik it doesn't load any
> models if authorization is not required in a Controller.
>
> Here's part of debug($this) run in my pages_controller :
You may get better results using get_included_files 
<http://de.php.net/manual/en/function.get-included-files.php> / 
get_declared_classes 
<http://de.php.net/manual/en/function.get-declared-classes.php> or using 
a profiler, but yeah your results seem to indicate no models being 
loaded I think.
> No model loaded, I only don't like this *RECURSION* .. in a controller
> with like 6 models loaded there's a LOT of RECURSION.. do you have it
> as well ?
There is not much you can do against that recursion and its not really a 
problem for performance (I think). What you could try is to write your 
own debug() function that keeps a hash of items already iterated through 
and makes sure inifinite recursions will not be followed (my experience 
has shown that the print_r behavior here is inconsistent).
> So from some point there's a question where to put your resources :
> trying to optimize the code or buying and adding hardware to cope with
> a higher load.
I'm usually for throwing more CPU cycles at things instead of 
development time as the latter is more expensive and better spend on 
improving the user experience / maintainability rather then the speed. 
That being said, this is not meant as an excuse for not looking into 
obvious bottle necks / scalability issues and resolving them. But after 
that, you reach a point where optimizing things becomes more and more 
difficult and may even make your application harder to maintain, thats 
the point where I'd say throw more servers at it instead of developers.
> Thanks! We've got more then 5000 facebook users in a first week and
> 1000 daily active users (new facebook metric), up to 13000 pageviews/
> day so it's coming along nicely :)
Oh its a Facebook app - cool : ). Add me to your friends and tell me 
what app it is so I can give it a try (my profile is: 
http://hs.facebook.com/profile.php?id=1114020732). Oh and 
congratulations to your success so far, thats pretty cool. Hope you'll 
find some time into sharing your experiences in using and scaling 
CakePHP for this at some point with the community : ).

-- Felix
--------------------------
My Blog: http://www.thinkingphp.org
My Business: http://www.fg-webdesign.de


thequietlab wrote:
>   
>> 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 not required in a Controller.
>
> Here's part of debug($this) run in my pages_controller :
>
> [name] => Pages
>     [helpers] => Array
>         (
>             [0] => Html
>             [1] => Text
>             [2] => Form
>             [3] => OthAuth
>             [4] => tqlTools
>         )
>
>     [uses] =>
>     [components] => Array
>         (
>             [0] => othAuth
>             [1] => Session
>         )
> .....
> .....
> [othAuth] => othAuthComponent Object
> (
> .......
> [controller] => PagesController Object
>  *RECURSION*
> ....
> )
>
>
> No model loaded, I only don't like this *RECURSION* .. in a controller
> with like 6 models loaded there's a LOT of RECURSION.. do you have it
> as well ?
>
>
>   
>> My suggestion is to not work / rely on benchmark solutions that just
>> hammer at your server too much - its very complex to create a realistic
>> scenario that way (i.e. 20 users holding down on your front page or some
>> other action is very different from each of them doing different
>> things). The best way to make your app faster should be to get some
>> profiler going and see what functions / parts of your app take the
>> longest to load and then optimize them.
>>     
>
> Yeah, I'm taking a closer look on xdebug, I will post some results if
> I manage to run it.
>
>
>   
>> From there I'd keep an eye
>> closely on the server load during traffic peaks which you can use to
>> generate yourself some statistics to estimate when your current horse
>> power will not be enough anymore. Then it is time to cluster and scale
>> your architecture.
>>     
>
> So from some point there's a question where to put your resources :
> trying to optimize the code or buying and adding hardware to cope with
> a higher load.
>
>
>   
>> Anyway, I'm not an expert on the matter and you may
>> be able diagnose things with your current benchmark setup as well -
>> however I think its not the easiest path.
>>
>> Good luck and success with your app!
>>     
>
> Thanks! We've got more then 5000 facebook users in a first week and
> 1000 daily active users (new facebook metric), up to 13000 pageviews/
> day so it's coming along nicely :)
>
> Best,
> Andrzej
>
>
> >
>
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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