CakePHP 3 Ajax Call Performance issue

2015-05-22 Thread Gopakumar PG


we have done the below code element ( text posting by ajax ) in cakephp 2.5 
later we changed to cakephp 3 , it seems like the performance of the 
function is diminished to a very noticeable extend in cakephp 3 (mainly 
speed is decreased 250 ms to 1.4s) thanks in advance:)

// ajax call to save post
$.ajax({
type: "POST",
url: baseUrl + 'posts/add',
data: data,
dataType: "json",
success: function(response, status) {

if(!response.success) {
alert('An unexpected error has 
occurred!');
}else{

append_post(response.post_id);
}

},
error: function(response, status) {
console.log(response);
alert('An unexpected error has 
occurred!!');
}
});

//posts/add  function

public function add()
{   $this->layout ='ajax';
$this->autoRender = FALSE;

$post = $this->Posts->newEntity();

if ($this->request->is('post')) {

$status['success'] = FALSE;

$post = $this->Posts->patchEntity($post, $this->request->data);


if ($this->Posts->save($post)) {
   $status['success'] = True; 
   $status['post_id'] = $post->id; 

}
$this->response->body(json_encode($status));
return $this->response;
}


}   

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Design high performance CakePHP app - How to?

2014-05-13 Thread Salines
Thank you.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Design high performance CakePHP app - How to?

2014-05-11 Thread Patrick Schiel
Serving JSON will be faster, because you bypass View and Layout rendering 
and don't use any Helpers (that make heavy use of Hash class and are 
somewhat slow for certain outputs).
Caching is always useful. OPCache for PHP, Memcache/APC to cache 
application data and models, Fastcgicache for lots of requests per second 
(doesn't slow down but duplicate requests within a short time are 
considerably faster).
As for database modeling, this isn't really CakePHP related, indexing and 
denormalization strategies are up to you.

In general, it's a good way to use a profiler and start tackling the parts 
that consume the most time.

I hope this helps a bit,
Patrick



Am Freitag, 9. Mai 2014 12:43:23 UTC+2 schrieb Salines:
>
> I need some answers related to performance .
>
> I made a lot of web applications with low traffic . Now , I need to do one 
> little demanding , it is a prototype for an early stage startup project .
> Web applications need to serve dynamically generated html and restful ( 
> json ) content . Backend application searches relational database with 
> fulltext search capabilities . Users accessing content via mobile apps and 
> web browser . Mobile applications developed using PhoneGap framework and 
> communicates with the server via a restful api .
>
>
> Web applications have html ajax interface , which takes data from a 
> restful APIs , and on the client side generated HTML content . In my belief 
> CakePHP can better respond to multiple concurrent requests , if served json 
> data instead of generating HTML views . *Am I right ?*
>
>
> Now we come to what may hamper good performance , and it's Database 
> modeling .
>
>
> As I wrote in the beginning of this topic , db must have fulltext search 
> capabilities , and the tables have multiple relationships . This means that 
> a query can contain 5-6 join links and more .
>
>
> *Read - Write?* DB must Read and respond to millions of queries per day 
> . The application is designed mainly to read from the database , write to 
> the database is not intense .
>
> Every request sent to the server itself is unique , so I do not see the 
> point to use a cache system , or maybe I'm wrong ? At a later stage we plan 
> to add ElasticSearch as a major search engine , but before that we have an 
> idea to make a special search mysql table , where it will copy the contents 
> , after the user selects an item in html form, from a variety of related 
> models , write own  text and save it all .
>
> Yes, this is a duplication of content, but in this way we want to avoid 
> multiple joins links, and improve the performance of search content. This 
> table should behave similarly to NoSQL Database. It is our opinion, we may 
> make mistakes and can give us a better solution.
>
> Due to limited resources, we are forced to improvise. 
>
> Other features: 
>
> Nginx server 
> Multi-language interface, 
> transactions, 
> payments Gatway (Paymill, PayPal),..
>
>
> Now I want to hear your tips to improve performance for this type of 
> application. 
>
> thanks,
>
> Nikola
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Design high performance CakePHP app - How to?

2014-05-09 Thread Salines
I need some answers related to performance .

I made a lot of web applications with low traffic . Now , I need to do one 
little demanding , it is a prototype for an early stage startup project .
Web applications need to serve dynamically generated html and restful ( 
json ) content . Backend application searches relational database with 
fulltext search capabilities . Users accessing content via mobile apps and 
web browser . Mobile applications developed using PhoneGap framework and 
communicates with the server via a restful api .


Web applications have html ajax interface , which takes data from a restful 
APIs , and on the client side generated HTML content . In my belief CakePHP 
can better respond to multiple concurrent requests , if served json data 
instead of generating HTML views . *Am I right ?*


Now we come to what may hamper good performance , and it's Database 
modeling .


As I wrote in the beginning of this topic , db must have fulltext search 
capabilities , and the tables have multiple relationships . This means that 
a query can contain 5-6 join links and more .


*Read - Write?* DB must Read and respond to millions of queries per day 
. The application is designed mainly to read from the database , write to 
the database is not intense .

Every request sent to the server itself is unique , so I do not see the 
point to use a cache system , or maybe I'm wrong ? At a later stage we plan 
to add ElasticSearch as a major search engine , but before that we have an 
idea to make a special search mysql table , where it will copy the contents 
, after the user selects an item in html form, from a variety of related 
models , write own  text and save it all .

Yes, this is a duplication of content, but in this way we want to avoid 
multiple joins links, and improve the performance of search content. This 
table should behave similarly to NoSQL Database. It is our opinion, we may 
make mistakes and can give us a better solution.

Due to limited resources, we are forced to improvise. 

Other features: 

Nginx server 
Multi-language interface, 
transactions, 
payments Gatway (Paymill, PayPal),..


Now I want to hear your tips to improve performance for this type of 
application. 

thanks,

Nikola

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Best load model performance

2014-02-21 Thread Gildonei Mendes Anacleto Junior
Hello all,

I'd like to know wich of this options give me the best performance when 
loading models to find data.


   1. The use of "use" propertie on controller
  - public $uses = array('Model1', 'Model2', ...);
  2. The use of loadModel method inside specific method
  - $this->loadModel('Model1'); $this->loadModel('Model2');
  3. The chain model 
  - $this->Model1->Model2->find
  - $this->Model1->Model2->Model3
  

I did some tests using DebugKit to compare memory usage and request time 
but I didn't find anything conclusive.

Cheers

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Performance

2013-05-23 Thread André Luis
Very nice, I already use most of those techniques, thanks!!

But it seems the more internet get faster, more people care about website 
sizing and requests count

Em quinta-feira, 23 de maio de 2013 11h04min06s UTC-3, Eduardo Barbosa 
Moreira escreveu:
>
> Hello friends, there is a guide about performance, it is very usefull: 
> http://browserdiet.com/
>
> Do you know it?
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Performance

2013-05-23 Thread Eduardo Moreira
Hello friends, there is a guide about performance, it is very usefull:
http://browserdiet.com/

Do you know it?

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Cakephp 2.3 find('all')/paginate() performance question

2013-03-20 Thread Marco Vilera
Hey people,

I'm quite new to cakephp, have around a month developing a small app just 
for learning purposes.

Currently i'm having an issue, which while it's not really problematic, in 
this case. it's quite stressing me not finding a way to solve it.

Any of my paginate/find calls, are slowing my controller actions by around 
1-1.2 segs, no matter how many records I have in this table it could be 10 
records or 2000, it will always await around 1000 ms to render my view. 

I have tried several things I looked around in google, like using recursive 
= -1, disabling debug mode, properly indexing my database, using 
containable behavior, and none of this is improving my response time. Only 
thing that I haven't tried is to implement cache in find, since the way my 
app will work, it's not likely that 2 queries will be the same, or at least 
not the most used methods. 

My SQL queries are quite simple and will delay maximum around 10ms, most of 
them are around 2-3 ms according to debug_kit plugin.

Would love any kind of input, i'm falling in love with this framework but 
this issue is disturbing me.

P.S: English is not my native language, please if there is something you 
don't understand, let me know and i'll try to make it clear.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: $this->loadModel and performance

2012-06-22 Thread Andras Kende
the code below should work fine more detail:
http://nuts-and-bolts-of-cakephp.com/2009/03/27/paginate-associated-models-data-in-cakephp/

loadModel is not a bad way of doings things, you just don't need it in this 
case as your User hasMany Post...

Andras Kende
http://www.kende.com

On Jun 22, 2012, at 12:07 PM, JonStark wrote:

> But if I have to d this in a User view, I still need to load, isn't it ? 
> 'Post.created' won't be matched in the UserController right ?
> 
> Thing is I display all user's posts on user profiles.
> 
> But anyway, is loadModel really a bad way of doing things ? Is it really 
> heavier for the server ?
> 
> Le vendredi 22 juin 2012 20:33:45 UTC+2, Andras Kende a écrit :
> I think you could do as below, without using loadModel…..
> 
>   $this->paginate = array(
>   'conditions' => array(
>   'Post.user_id' => $userId
>   ),
>   'order' => array(
>   'Post.created' => 'ASC'
>   ),
>   'limit' => 100,
>   'maxLimit' => 100
>   );
>   $posts = $this->paginate($this->User->Post);
>   $this->set(compact('posts'));
> 
> check the sql and print_r($posts) …  make sure to only pull data what you 
> need,  use fields, recursive, contain….
> 
> Andras Kende
> http://www.kende.com
> 
> 
> 
> On Jun 22, 2012, at 6:40 AM, JonStark wrote:
> 
>> Even when having relationships (hasMany and such) implemented, I feel the 
>> need to user $this->loadModel to display related data. Indeed, when a User 
>> has 450 posts, there is a need to limit the number of associated data 
>> returned. But when I want to paginate all posts for a user profile, I use 
>> $this->loadModel .
>> 
>> But my question is : does it have an inpact on general performance ?
>> 
>> Thanks for your answers/ experience.
>> 
>> -- 
>> Our newest site for the community: CakePHP Video Tutorials 
>> http://tv.cakephp.org 
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
>> others with their CakePHP related questions.
>>  
>>  
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
>> http://groups.google.com/group/cake-php
> 
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: $this->loadModel and performance

2012-06-22 Thread JonStark
But if I have to d this in a User view, I still need to load, isn't it ? 
'Post.created' 
won't be matched in the UserController right ?

Thing is I display all user's posts on user profiles.

But anyway, is loadModel really a bad way of doing things ? Is it really 
heavier for the server ?

Le vendredi 22 juin 2012 20:33:45 UTC+2, Andras Kende a écrit :
>
> I think you could do as below, without using loadModel…..
>
> $this->paginate = array(
> 'conditions' => array(
> 'Post.user_id' => $userId
> ),
> 'order' => array(
> 'Post.created' => 'ASC'
> ),
> 'limit' => 100,
> 'maxLimit' => 100
> );
> $posts = $this->paginate($this->User->Post);
> $this->set(compact('posts'));
>
> check the sql and print_r($posts) …  make sure to only pull data what you 
> need,  use fields, recursive, contain….
>
> Andras Kende
> http://www.kende.com
>
>
>
> On Jun 22, 2012, at 6:40 AM, JonStark wrote:
>
> Even when having relationships (hasMany and such) implemented, I feel the 
> need to user $this->loadModel to display related data. Indeed, when a User 
> has 450 posts, there is a need to limit the number of associated data 
> returned. But when I want to paginate all posts for a user profile, I 
> use $this->loadModel .
>
> But my question is : does it have an inpact on general performance ?
>
> Thanks for your answers/ experience.
>
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> at http://groups.google.com/group/cake-php
>
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: $this->loadModel and performance

2012-06-22 Thread Andras Kende
I think you could do as below, without using loadModel…..

$this->paginate = array(
'conditions' => array(
'Post.user_id' => $userId
),
'order' => array(
'Post.created' => 'ASC'
),
'limit' => 100,
'maxLimit' => 100
);
$posts = $this->paginate($this->User->Post);
$this->set(compact('posts'));

check the sql and print_r($posts) …  make sure to only pull data what you need, 
 use fields, recursive, contain….

Andras Kende
http://www.kende.com



On Jun 22, 2012, at 6:40 AM, JonStark wrote:

> Even when having relationships (hasMany and such) implemented, I feel the 
> need to user $this->loadModel to display related data. Indeed, when a User 
> has 450 posts, there is a need to limit the number of associated data 
> returned. But when I want to paginate all posts for a user profile, I use 
> $this->loadModel .
> 
> But my question is : does it have an inpact on general performance ?
> 
> Thanks for your answers/ experience.
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


$this->loadModel and performance

2012-06-22 Thread JonStark
Even when having relationships (hasMany and such) implemented, I feel the 
need to user $this->loadModel to display related data. Indeed, when a User 
has 450 posts, there is a need to limit the number of associated data 
returned. But when I want to paginate all posts for a user profile, I 
use $this->loadModel .

But my question is : does it have an inpact on general performance ?

Thanks for your answers/ experience.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakePHP 2.1.1 Performance

2012-04-29 Thread AD7six


On Friday, 27 April 2012 16:48:53 UTC+2, Mika wrote:
>
> Since we upgraded our web application to Cake 2.1.1 it has literally 
> killed our server several times. In WHM the "Server load (4 CPUs)" 
> under Service Status runs above 15 the entire time, and spikes up to 
> 50 and as high as 70, at which point the server basically dies. 
>
> The same application under exactly the same load running on Cake 
> 1.3.15 does not have near the same effect on the server. On 1.3.15 the 
> server load in WHM never exceeds 2. 
>
> It is exactly the same application. 


Since 2.x is not backward compatible and quite different from 1.3; "exactly 
the same" isn't particularly meaningful - If the code was exactly-the-same 
it wouldn't work at all with 2.x.
 

> The only changes we made were ones 
> required to make the application run on Cake 2.1.1. 


So, not exactly the same :)
 

> There is nothing 
> else running on the server. It's dedicated to just this one web 
> application. 
>
> We've swapped the code base back and forth (between 1.3.15 and 2.1.1) 
> a few times on the live server, and the results were the same every 
> time. On 1.3.15 the server hums, on 2.1.1 it dies. 
>
> Has anyone else had similar experiences?


You need to profile your app - or just use debug kit to identify what your 
app is doing.

Any issues of this kind are going to be in your app code, or in some way 
setup/config related. The cause, whatever it is, should be blindingly 
obvious (a loop of some kind; constant cache-misses or ) by looking at what your code is actually doing

AD 

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakePHP 2.1.1 Performance

2012-04-27 Thread Justin Edwards
http://xdebug.org/docs/profiler

On Sat, Apr 28, 2012 at 12:16 AM, Thiago Belem
wrote:

> Can you provide more information about you server like os, versions, cache
> setup and etc?
>
> Regards,
> --
>
> Thiago Belem
>
> Enviado do meu Android (e sujeito a erros do corretor automático)
> Em 27/04/2012 20:17, "Mika"  escreveu:
>
> Since we upgraded our web application to Cake 2.1.1 it has literally
>> killed our server several times. In WHM the "Server load (4 CPUs)"
>> under Service Status runs above 15 the entire time, and spikes up to
>> 50 and as high as 70, at which point the server basically dies.
>>
>> The same application under exactly the same load running on Cake
>> 1.3.15 does not have near the same effect on the server. On 1.3.15 the
>> server load in WHM never exceeds 2.
>>
>> It is exactly the same application. The only changes we made were ones
>> required to make the application run on Cake 2.1.1. There is nothing
>> else running on the server. It's dedicated to just this one web
>> application.
>>
>> We've swapped the code base back and forth (between 1.3.15 and 2.1.1)
>> a few times on the live server, and the results were the same every
>> time. On 1.3.15 the server hums, on 2.1.1 it dies.
>>
>> Has anyone else had similar experiences?
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakePHP 2.1.1 Performance

2012-04-27 Thread Thiago Belem
Can you provide more information about you server like os, versions, cache
setup and etc?

Regards,
--

Thiago Belem

Enviado do meu Android (e sujeito a erros do corretor automático)
Em 27/04/2012 20:17, "Mika"  escreveu:

> Since we upgraded our web application to Cake 2.1.1 it has literally
> killed our server several times. In WHM the "Server load (4 CPUs)"
> under Service Status runs above 15 the entire time, and spikes up to
> 50 and as high as 70, at which point the server basically dies.
>
> The same application under exactly the same load running on Cake
> 1.3.15 does not have near the same effect on the server. On 1.3.15 the
> server load in WHM never exceeds 2.
>
> It is exactly the same application. The only changes we made were ones
> required to make the application run on Cake 2.1.1. There is nothing
> else running on the server. It's dedicated to just this one web
> application.
>
> We've swapped the code base back and forth (between 1.3.15 and 2.1.1)
> a few times on the live server, and the results were the same every
> time. On 1.3.15 the server hums, on 2.1.1 it dies.
>
> Has anyone else had similar experiences?
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


CakePHP 2.1.1 Performance

2012-04-27 Thread Mika
Since we upgraded our web application to Cake 2.1.1 it has literally
killed our server several times. In WHM the "Server load (4 CPUs)"
under Service Status runs above 15 the entire time, and spikes up to
50 and as high as 70, at which point the server basically dies.

The same application under exactly the same load running on Cake
1.3.15 does not have near the same effect on the server. On 1.3.15 the
server load in WHM never exceeds 2.

It is exactly the same application. The only changes we made were ones
required to make the application run on Cake 2.1.1. There is nothing
else running on the server. It's dedicated to just this one web
application.

We've swapped the code base back and forth (between 1.3.15 and 2.1.1)
a few times on the live server, and the results were the same every
time. On 1.3.15 the server hums, on 2.1.1 it dies.

Has anyone else had similar experiences?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Bad performance

2011-10-17 Thread AD7six


On Oct 16, 9:13 pm, Jerre  wrote:
> Hey Folks!
>
> So we've developed a CakePHP (1.3) application and it is currently
> live in production (www.fom.be).
> However there seems to be some performance issues regarding the CPU
> load with multiple simultaneous requests.
> The website is for an event which takes place 2 times a year. Between
> the events, there is little traffic to the website, but during the
> events we expect 10.000 requests/day (for 3 days).

That isn't exactly a lot of traffic.

> During our last
> event (where we first tested the site), we often got server timeouts.
>
> We have a live production server (which is a VPS), a test environment
> (which is on a shared webhost, and debug = 2), and we've also done
> some performance testing on a local server, on which we simulate the
> production server on a VPS.
>
> A first issue we have is the slowness of CakePHP, it takes 317ms
> before we receive the first answer from the webserver

That time includes dns resolution, network latency + *your app code*.
The latter being the most important part.

> (measured with
> 'Inspect Element' in Google Chrome 
> -http://gyazo.com/27ab6d8158627e7026296d19ba26bcb1.png).
> We've implemented caching,

What kind of caching

> added indexes to our database tables,
> debugmode = 0, removed link() functions (which came up to be very slow
> after debugging with XDebug)

That was probably a mistake

>
> Another issue seems to be some kind of apache/php configuration issue:
> Using ab (http://httpd.apache.org/docs/2.0/programs/ab.html) we got
> the following test results:
>
> Test environment (www.de-raedt.eu/fomsitenew)
> Dualcore E2200 600Mhz, 4GB RAM, we suspect CentOS (we don't know the
> actual configuration)
> concurrent connections  requests / s
> 1       13,77
> 2       12,07
> 3       37,88
> 4       23,62
> 5       63,61
> 7       75
> 10      70
> 20      95
>
> Production environment (www.fom.be)
> VPS with Debian 6.0.2, 1 core, 3GHz, 1GB RAM (QEMU Virtual CPU 0.12.3)
> concurrent connections  requests / s
> 1       1,1
> 2       1,52
> 3       1,84
> 4       1,86
> 5       1,82
> 7       1,76
> 10      2,06
> 20      1,52
> Here we see 100% CPU usage on almost every testing that we 
> did.http://gyazo.com/efc60112417b79d65023e35ce2b719d5.png

The point of a siege test is to load the system, getting 100% cpu
usage means your code is cpu-bound (which probably means you've got it
doing /a lot/ of work on all requests).

>
> So we were wondering what configuration on the Testing environment (of
> which we don't have full access to, it's on a shared webhost) may
> cause these differences.

There are a lot of potential reasons, and not all of them are related
to apache setup (infact, most of  them are related to code).

> It seems that the webserver succeeds in
> scaling the website for many users?
> Even with the better test results of our Testing environment, we still
> feel like the number of simultaneous connections is very limited, is
> this normal?
>
> We're very curious about your suggestions!

Have you checked the php and app logs for error messages?

Do requests for e.g. / read from cache or talk to the db? If GET
requests, especially from anon users  generate db queries - that's the
first thing you want to change.

https://github.com/mcurry/html_cache <- most likely the sort of
caching you need/want

Any request that starts a session will block all other requests that
start a session (for the same user).

If you use ab - you need access to the environment to be able to see/
tweak things and see results (i.e. do it locally).

Some low-effort solutions that hide poor php code performance:
http://www.slideshare.net/caillou/varnish-lightning-talk
https://twitter.com/#!/mattalkingshit/status/124782270883180544

AD
PS - new site (?), XHTML 1.0 strict and tables?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Bad performance

2011-10-16 Thread somebody who carez
http://www.webpagetest.org/result/111017_8J_4a440d13d78d67a2001c9db245c8fed0/1/details/

compress images
use cdn

sorry I can't be of more help, but this is the most obvious stuff I can see.
If you need more I'd have to send you a invoice.

Thank you,
-nop nop nop


On Sun, Oct 16, 2011 at 12:13 PM, Jerre  wrote:

> Hey Folks!
>
> So we've developed a CakePHP (1.3) application and it is currently
> live in production (www.fom.be).
> However there seems to be some performance issues regarding the CPU
> load with multiple simultaneous requests.
> The website is for an event which takes place 2 times a year. Between
> the events, there is little traffic to the website, but during the
> events we expect 10.000 requests/day (for 3 days). During our last
> event (where we first tested the site), we often got server timeouts.
>
> We have a live production server (which is a VPS), a test environment
> (which is on a shared webhost, and debug = 2), and we've also done
> some performance testing on a local server, on which we simulate the
> production server on a VPS.
>
> A first issue we have is the slowness of CakePHP, it takes 317ms
> before we receive the first answer from the webserver (measured with
> 'Inspect Element' in Google Chrome -
> http://gyazo.com/27ab6d8158627e7026296d19ba26bcb1.png).
> We've implemented caching, added indexes to our database tables,
> debugmode = 0, removed link() functions (which came up to be very slow
> after debugging with XDebug), ...
>
> Another issue seems to be some kind of apache/php configuration issue:
> Using ab (http://httpd.apache.org/docs/2.0/programs/ab.html) we got
> the following test results:
>
> Test environment (www.de-raedt.eu/fomsitenew)
> Dualcore E2200 600Mhz, 4GB RAM, we suspect CentOS (we don't know the
> actual configuration)
> concurrent connections  requests / s
> 1   13,77
> 2   12,07
> 3   37,88
> 4   23,62
> 5   63,61
> 7   75
> 10  70
> 20  95
>
> Production environment (www.fom.be)
> VPS with Debian 6.0.2, 1 core, 3GHz, 1GB RAM (QEMU Virtual CPU 0.12.3)
> concurrent connections  requests / s
> 1   1,1
> 2   1,52
> 3   1,84
> 4   1,86
> 5   1,82
> 7   1,76
> 10  2,06
> 20  1,52
> Here we see 100% CPU usage on almost every testing that we did.
> http://gyazo.com/efc60112417b79d65023e35ce2b719d5.png
>
> So we were wondering what configuration on the Testing environment (of
> which we don't have full access to, it's on a shared webhost) may
> cause these differences. It seems that the webserver succeeds in
> scaling the website for many users?
> Even with the better test results of our Testing environment, we still
> feel like the number of simultaneous connections is very limited, is
> this normal?
>
> We're very curious about your suggestions!
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Bad performance

2011-10-16 Thread Jerre
Hey Folks!

So we've developed a CakePHP (1.3) application and it is currently
live in production (www.fom.be).
However there seems to be some performance issues regarding the CPU
load with multiple simultaneous requests.
The website is for an event which takes place 2 times a year. Between
the events, there is little traffic to the website, but during the
events we expect 10.000 requests/day (for 3 days). During our last
event (where we first tested the site), we often got server timeouts.

We have a live production server (which is a VPS), a test environment
(which is on a shared webhost, and debug = 2), and we've also done
some performance testing on a local server, on which we simulate the
production server on a VPS.

A first issue we have is the slowness of CakePHP, it takes 317ms
before we receive the first answer from the webserver (measured with
'Inspect Element' in Google Chrome - 
http://gyazo.com/27ab6d8158627e7026296d19ba26bcb1.png).
We've implemented caching, added indexes to our database tables,
debugmode = 0, removed link() functions (which came up to be very slow
after debugging with XDebug), ...

Another issue seems to be some kind of apache/php configuration issue:
Using ab (http://httpd.apache.org/docs/2.0/programs/ab.html) we got
the following test results:

Test environment (www.de-raedt.eu/fomsitenew)
Dualcore E2200 600Mhz, 4GB RAM, we suspect CentOS (we don't know the
actual configuration)
concurrent connections  requests / s
1   13,77
2   12,07
3   37,88
4   23,62
5   63,61
7   75
10  70
20  95

Production environment (www.fom.be)
VPS with Debian 6.0.2, 1 core, 3GHz, 1GB RAM (QEMU Virtual CPU 0.12.3)
concurrent connections  requests / s
1   1,1
2   1,52
3   1,84
4   1,86
5   1,82
7   1,76
10  2,06
20  1,52
Here we see 100% CPU usage on almost every testing that we did.
http://gyazo.com/efc60112417b79d65023e35ce2b719d5.png

So we were wondering what configuration on the Testing environment (of
which we don't have full access to, it's on a shared webhost) may
cause these differences. It seems that the webserver succeeds in
scaling the website for many users?
Even with the better test results of our Testing environment, we still
feel like the number of simultaneous connections is very limited, is
this normal?

We're very curious about your suggestions!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: performance / traffic / .. -> one READ or few FIND calls?

2011-10-16 Thread cakii
alright, thank you guys !

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: performance / traffic / .. -> one READ or few FIND calls?

2011-10-14 Thread WebbedIT
I agree too, my point was related to an issue a user had here last
week, they were using read() before a save call and it was updating
the model's data array and causing various issues.

Paul

On Oct 13, 12:43 pm, Jeremy Burns | Class Outfit
 wrote:
> Agree with you Andy. My point was exactly that you should do a properly 
> formed find statement (using containable behaviour or at least sensible 
> recursion [shudder]) rather than a blanket read, which in my experience can 
> often generate a huge array of stuff I don't need at the time.
>
> Jeremy Burns
> Class Outfit
>
> Tel: +44 (0) 208 123 3822
> Mob: +44 (0) 7973 481949
> Skype: jeremy_burnshttp://www.classoutfit.com
>
> On 13 Oct 2011, at 12:39, AD7six wrote:
>
>
>
>
>
>
>
>
>
> > On Oct 13, 1:30 pm, Jeremy Burns | Class Outfit
> >  wrote:
> >> If you have a model with many associations, debug out the results of 
> >> read() - and you'll be amazed at how much it pulls back. I never use it.
>
> > Verging on FUD guys.
>
> >https://github.com/cakephp/cakephp/blob/2.0/lib/Cake/Model/Model.php#...
>
> > There's no "performance" difference between using read and find first.
>
> > cakii
>
> > SELECT list, of, fields FROM foo WHERE id = 1
>
> > is better than
>
> > SELECT list FROM foo WHERE id = 1
> > SELECT of FROM foo WHERE id = 1
> > SELECT fields FROM foo WHERE id = 1
>
> > Don't ask for fields you're not going to use - don't go back to the db
> > to get fields you "forgot" to ask for the first time. Use debug kit or
> > simply the query log and look at the sql you're generating - if you
> > don't change the recursive value of the model you might be generating
> > a lot more queries - or joins -  than you expect/want.
>
> > AD
>
> > --
> > Our newest site for the community: CakePHP Video 
> > Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help 
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: performance / traffic / .. -> one READ or few FIND calls?

2011-10-13 Thread Jeremy Burns | Class Outfit
Agree with you Andy. My point was exactly that you should do a properly formed 
find statement (using containable behaviour or at least sensible recursion 
[shudder]) rather than a blanket read, which in my experience can often 
generate a huge array of stuff I don't need at the time.

Jeremy Burns
Class Outfit

Tel: +44 (0) 208 123 3822
Mob: +44 (0) 7973 481949
Skype: jeremy_burns
http://www.classoutfit.com

On 13 Oct 2011, at 12:39, AD7six wrote:

> 
> 
> On Oct 13, 1:30 pm, Jeremy Burns | Class Outfit
>  wrote:
>> If you have a model with many associations, debug out the results of read() 
>> - and you'll be amazed at how much it pulls back. I never use it.
> 
> Verging on FUD guys.
> 
> https://github.com/cakephp/cakephp/blob/2.0/lib/Cake/Model/Model.php#L1412
> 
> There's no "performance" difference between using read and find first.
> 
> cakii
> 
> SELECT list, of, fields FROM foo WHERE id = 1
> 
> is better than
> 
> SELECT list FROM foo WHERE id = 1
> SELECT of FROM foo WHERE id = 1
> SELECT fields FROM foo WHERE id = 1
> 
> Don't ask for fields you're not going to use - don't go back to the db
> to get fields you "forgot" to ask for the first time. Use debug kit or
> simply the query log and look at the sql you're generating - if you
> don't change the recursive value of the model you might be generating
> a lot more queries - or joins -  than you expect/want.
> 
> AD
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: performance / traffic / .. -> one READ or few FIND calls?

2011-10-13 Thread AD7six


On Oct 13, 1:30 pm, Jeremy Burns | Class Outfit
 wrote:
> If you have a model with many associations, debug out the results of read() - 
> and you'll be amazed at how much it pulls back. I never use it.

Verging on FUD guys.

https://github.com/cakephp/cakephp/blob/2.0/lib/Cake/Model/Model.php#L1412

There's no "performance" difference between using read and find first.

cakii

SELECT list, of, fields FROM foo WHERE id = 1

is better than

SELECT list FROM foo WHERE id = 1
SELECT of FROM foo WHERE id = 1
SELECT fields FROM foo WHERE id = 1

Don't ask for fields you're not going to use - don't go back to the db
to get fields you "forgot" to ask for the first time. Use debug kit or
simply the query log and look at the sql you're generating - if you
don't change the recursive value of the model you might be generating
a lot more queries - or joins -  than you expect/want.

AD

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: performance / traffic / .. -> one READ or few FIND calls?

2011-10-13 Thread Jeremy Burns | Class Outfit
If you have a model with many associations, debug out the results of read() - 
and you'll be amazed at how much it pulls back. I never use it.

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 13 Oct 2011, at 12:02, WebbedIT wrote:

> read() also can put you in strange situations as it loads whatever
> data it fetches into the model's data array, so as euromark says,
> start using find instead.
> 
> HTH, Paul.
> 
> On Oct 12, 11:45 am, euromark  wrote:
>> a) you never need read() - i dont use read() once for over 3000
>> actions.
>> i favor always the find() due to its advantages like contain and
>> fields
>> you just need to remember to always pass along the id (which would
>> read do automatically)
>> 
>> b) updateAll() is atomic and does exactly want you want.
>> 
>> On 12 Okt., 11:34, cakii  wrote:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> Hi everyone,
>> 
>>> i start think bout performance, traffic, aweseom code etc.
>>> i have a few *find *commands in my model, depending on the flow 3-6 'little'
>>> *finds*, sometimes *field *only.
>>> depending on the request flow, in the worst case all data /finds is needed
>>> -> read equivalent
>> 
>>> do you think its wiser, make one 'big' *read* (20 fields in one model and in
>>> correspondning model betwenn 5 and about 50 fields) *everytime *and using 
>>> *model->
>>> data *for further actions instead of the more or less find calls ?
>> 
>>> ..
>>> another little question:
>> 
>>> whats the best way to raise an int field in a database in cakephp, like:
>>> UPDATE foo SET bar = bar+1
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: performance / traffic / .. -> one READ or few FIND calls?

2011-10-13 Thread WebbedIT
read() also can put you in strange situations as it loads whatever
data it fetches into the model's data array, so as euromark says,
start using find instead.

HTH, Paul.

On Oct 12, 11:45 am, euromark  wrote:
> a) you never need read() - i dont use read() once for over 3000
> actions.
> i favor always the find() due to its advantages like contain and
> fields
> you just need to remember to always pass along the id (which would
> read do automatically)
>
> b) updateAll() is atomic and does exactly want you want.
>
> On 12 Okt., 11:34, cakii  wrote:
>
>
>
>
>
>
>
> > Hi everyone,
>
> > i start think bout performance, traffic, aweseom code etc.
> > i have a few *find *commands in my model, depending on the flow 3-6 'little'
> > *finds*, sometimes *field *only.
> > depending on the request flow, in the worst case all data /finds is needed
> > -> read equivalent
>
> > do you think its wiser, make one 'big' *read* (20 fields in one model and in
> > correspondning model betwenn 5 and about 50 fields) *everytime *and using 
> > *model->
> > data *for further actions instead of the more or less find calls ?
>
> > ..
> > another little question:
>
> > whats the best way to raise an int field in a database in cakephp, like:
> > UPDATE foo SET bar = bar+1

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: performance / traffic / .. -> one READ or few FIND calls?

2011-10-12 Thread euromark
a) you never need read() - i dont use read() once for over 3000
actions.
i favor always the find() due to its advantages like contain and
fields
you just need to remember to always pass along the id (which would
read do automatically)

b) updateAll() is atomic and does exactly want you want.


On 12 Okt., 11:34, cakii  wrote:
> Hi everyone,
>
> i start think bout performance, traffic, aweseom code etc.
> i have a few *find *commands in my model, depending on the flow 3-6 'little'
> *finds*, sometimes *field *only.
> depending on the request flow, in the worst case all data /finds is needed
> -> read equivalent
>
> do you think its wiser, make one 'big' *read* (20 fields in one model and in
> correspondning model betwenn 5 and about 50 fields) *everytime *and using 
> *model->
> data *for further actions instead of the more or less find calls ?
>
> ..
> another little question:
>
> whats the best way to raise an int field in a database in cakephp, like:
> UPDATE foo SET bar = bar+1

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


performance / traffic / .. -> one READ or few FIND calls?

2011-10-12 Thread cakii
Hi everyone,

i start think bout performance, traffic, aweseom code etc.
i have a few *find *commands in my model, depending on the flow 3-6 'little' 
*finds*, sometimes *field *only.
depending on the request flow, in the worst case all data /finds is needed 
-> read equivalent

do you think its wiser, make one 'big' *read* (20 fields in one model and in 
correspondning model betwenn 5 and about 50 fields) *everytime *and using 
*model-> 
data *for further actions instead of the more or less find calls ?



..
another little question:

whats the best way to raise an int field in a database in cakephp, like:
UPDATE foo SET bar = bar+1 

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Performance of CakePHP 2.0

2011-03-24 Thread cricket
On Thu, Mar 24, 2011 at 7:08 PM, Shinya Koizumi  wrote:
>>>development mode vs. no debug mode
> Is this just matter of "debug" => 0,1,2, right?

Yes. With debug > 0 caching is disabled.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Performance of CakePHP 2.0

2011-03-24 Thread Shinya Koizumi
>>development mode vs. no debug mode
Is this just matter of "debug" => 0,1,2, right?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Performance of CakePHP 2.0

2011-03-24 Thread mark_story
Sorry, but if you are on shared hosting you don't care about
performance.  Also CakePHP is much much slower in development mode vs.
no debug mode, as the filesystem is scrapped on every request, which
is a slow process.

-Mark

On Mar 23, 6:30 pm, Ziki  wrote:
> Currently it is on shared hosting with eAccelerator, HTML caching can
> be provided for few pages, but with other it is not possible because
> content is full dynamically and it will be changed all the time. This
> web application is complex, because its complexity I choose Cake.
>
> On 23 ožu, 19:49, "Ma'moon"  wrote:
>
>
>
> > 1) Have you tried using a bytecode cacher? i think that you should consider
> > using APC or Xcache if you are not using one of them already!
> > 2) Have you considered using HTML Caching for your site, this will
> > "seriously" help reducing server processing!
>
> > On Wed, Mar 23, 2011 at 1:28 PM, Ziki  wrote:
> > > My site is not so slow, but if I will have a lot of users this will be
> > > a problem. Here is imagehttp://dl.dropbox.com/u/905349/loadtimer.png
> > > of timer for loading the site. Only problem is cake core, and because
> > > of this I am asking is 2.0 version faster.
>
> > > On 23 ožu, 14:42, MaxDao  wrote:
> > > > I have same question about performance, and can't wait till we have
> > > > more stable version to test it. I have cakephp 1.1 project willing to
> > > > upgrade, however 1.3 is slower than 1.1
>
> > > > On 22 Бер, 15:19, Ziki  wrote:
>
> > > > > Hi,
>
> > > > > I am developing complex website (business and social network) with
> > > > > 1.3.6 version and it is pretty slow, maybe it is because my server and
> > > > > I did all tips and tricks (lazy loader, APC caching, caching queries,
> > > > > views) but generally it is slow and use more memory especially on the
> > > > > loading cake files. My question is would 2.0 version will be faster if
> > > > > I start using it, and does anybody has experienced performance
> > > > > improving? I think 2.0 should be faster :)
>
> > > > > Any comments are welcome.
>
> > > --
> > > Our newest site for the community: CakePHP Video Tutorials
> > >http://tv.cakephp.org
> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> > > others with their CakePHP related questions.
>
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Performance of CakePHP 2.0

2011-03-23 Thread Ziki
Currently it is on shared hosting with eAccelerator, HTML caching can
be provided for few pages, but with other it is not possible because
content is full dynamically and it will be changed all the time. This
web application is complex, because its complexity I choose Cake.


On 23 ožu, 19:49, "Ma'moon"  wrote:
> 1) Have you tried using a bytecode cacher? i think that you should consider
> using APC or Xcache if you are not using one of them already!
> 2) Have you considered using HTML Caching for your site, this will
> "seriously" help reducing server processing!
>
> On Wed, Mar 23, 2011 at 1:28 PM, Ziki  wrote:
> > My site is not so slow, but if I will have a lot of users this will be
> > a problem. Here is imagehttp://dl.dropbox.com/u/905349/loadtimer.png
> > of timer for loading the site. Only problem is cake core, and because
> > of this I am asking is 2.0 version faster.
>
> > On 23 ožu, 14:42, MaxDao  wrote:
> > > I have same question about performance, and can't wait till we have
> > > more stable version to test it. I have cakephp 1.1 project willing to
> > > upgrade, however 1.3 is slower than 1.1
>
> > > On 22 Бер, 15:19, Ziki  wrote:
>
> > > > Hi,
>
> > > > I am developing complex website (business and social network) with
> > > > 1.3.6 version and it is pretty slow, maybe it is because my server and
> > > > I did all tips and tricks (lazy loader, APC caching, caching queries,
> > > > views) but generally it is slow and use more memory especially on the
> > > > loading cake files. My question is would 2.0 version will be faster if
> > > > I start using it, and does anybody has experienced performance
> > > > improving? I think 2.0 should be faster :)
>
> > > > Any comments are welcome.
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Performance of CakePHP 2.0

2011-03-23 Thread Ma'moon
1) Have you tried using a bytecode cacher? i think that you should consider
using APC or Xcache if you are not using one of them already!
2) Have you considered using HTML Caching for your site, this will
"seriously" help reducing server processing!

On Wed, Mar 23, 2011 at 1:28 PM, Ziki  wrote:

> My site is not so slow, but if I will have a lot of users this will be
> a problem. Here is image http://dl.dropbox.com/u/905349/loadtimer.png
> of timer for loading the site. Only problem is cake core, and because
> of this I am asking is 2.0 version faster.
>
> On 23 ožu, 14:42, MaxDao  wrote:
> > I have same question about performance, and can't wait till we have
> > more stable version to test it. I have cakephp 1.1 project willing to
> > upgrade, however 1.3 is slower than 1.1
> >
> > On 22 Бер, 15:19, Ziki  wrote:
> >
> > > Hi,
> >
> > > I am developing complex website (business and social network) with
> > > 1.3.6 version and it is pretty slow, maybe it is because my server and
> > > I did all tips and tricks (lazy loader, APC caching, caching queries,
> > > views) but generally it is slow and use more memory especially on the
> > > loading cake files. My question is would 2.0 version will be faster if
> > > I start using it, and does anybody has experienced performance
> > > improving? I think 2.0 should be faster :)
> >
> > > Any comments are welcome.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Performance of CakePHP 2.0

2011-03-23 Thread Ziki
My site is not so slow, but if I will have a lot of users this will be
a problem. Here is image http://dl.dropbox.com/u/905349/loadtimer.png
of timer for loading the site. Only problem is cake core, and because
of this I am asking is 2.0 version faster.

On 23 ožu, 14:42, MaxDao  wrote:
> I have same question about performance, and can't wait till we have
> more stable version to test it. I have cakephp 1.1 project willing to
> upgrade, however 1.3 is slower than 1.1
>
> On 22 Бер, 15:19, Ziki  wrote:
>
> > Hi,
>
> > I am developing complex website (business and social network) with
> > 1.3.6 version and it is pretty slow, maybe it is because my server and
> > I did all tips and tricks (lazy loader, APC caching, caching queries,
> > views) but generally it is slow and use more memory especially on the
> > loading cake files. My question is would 2.0 version will be faster if
> > I start using it, and does anybody has experienced performance
> > improving? I think 2.0 should be faster :)
>
> > Any comments are welcome.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Performance of CakePHP 2.0

2011-03-23 Thread MaxDao
I have same question about performance, and can't wait till we have
more stable version to test it. I have cakephp 1.1 project willing to
upgrade, however 1.3 is slower than 1.1

On 22 Бер, 15:19, Ziki  wrote:
> Hi,
>
> I am developing complex website (business and social network) with
> 1.3.6 version and it is pretty slow, maybe it is because my server and
> I did all tips and tricks (lazy loader, APC caching, caching queries,
> views) but generally it is slow and use more memory especially on the
> loading cake files. My question is would 2.0 version will be faster if
> I start using it, and does anybody has experienced performance
> improving? I think 2.0 should be faster :)
>
> Any comments are welcome.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Performance of CakePHP 2.0

2011-03-22 Thread euromark
on windows there are some terrible "performance losses" with the
Folder class
other than that its probably app related - would be my guess


On 22 Mrz., 21:15, mark_story  wrote:
> I don't think many people have done extensive benchmarking of 2.0
> against 1.3.  I've done a bit myself, and there were some speed gains,
> but at the same time trying to build an application against an
> unstable code base is usually a bad idea.
>
> Have you done any profiling to find out what specifically is slow?
> You mention its slow, but no real reason why, or where the slowness is
> coming from.  Perhaps digging into that will help?
>
> -Mark
>
> On Mar 22, 10:07 am, Ziki  wrote:
>
>
>
>
>
>
>
> > We are now still in developing phase, we do not have users. Maybe for
> > 2 months it will be in beta version. Do you have any experience in 2.0
> > performance?
>
> > On 22 ožu, 14:40, Stephen  wrote:
>
> > > Not quite about speed, but I wouldn't really switch to 2.0 until it's 
> > > stable
> > > and officially released - especially if your website contains a large 
> > > amount
> > > of users
>
> > > On 22 March 2011 13:19, Ziki  wrote:
>
> > > > Hi,
>
> > > > I am developing complex website (business and social network) with
> > > > 1.3.6 version and it is pretty slow, maybe it is because my server and
> > > > I did all tips and tricks (lazy loader, APC caching, caching queries,
> > > > views) but generally it is slow and use more memory especially on the
> > > > loading cake files. My question is would 2.0 version will be faster if
> > > > I start using it, and does anybody has experienced performance
> > > > improving? I think 2.0 should be faster :)
>
> > > > Any comments are welcome.
>
> > > > --
> > > > Our newest site for the community: CakePHP Video Tutorials
> > > >http://tv.cakephp.org
> > > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> > > > others with their CakePHP related questions.
>
> > > > To unsubscribe from this group, send email to
> > > > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > > > athttp://groups.google.com/group/cake-php
>
> > > --
> > > Kind Regards
> > >  Stephen
>
> > >  http://www.ninjacodermonkey.co.uk

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Performance of CakePHP 2.0

2011-03-22 Thread mark_story
I don't think many people have done extensive benchmarking of 2.0
against 1.3.  I've done a bit myself, and there were some speed gains,
but at the same time trying to build an application against an
unstable code base is usually a bad idea.

Have you done any profiling to find out what specifically is slow?
You mention its slow, but no real reason why, or where the slowness is
coming from.  Perhaps digging into that will help?

-Mark

On Mar 22, 10:07 am, Ziki  wrote:
> We are now still in developing phase, we do not have users. Maybe for
> 2 months it will be in beta version. Do you have any experience in 2.0
> performance?
>
> On 22 ožu, 14:40, Stephen  wrote:
>
>
>
> > Not quite about speed, but I wouldn't really switch to 2.0 until it's stable
> > and officially released - especially if your website contains a large amount
> > of users
>
> > On 22 March 2011 13:19, Ziki  wrote:
>
> > > Hi,
>
> > > I am developing complex website (business and social network) with
> > > 1.3.6 version and it is pretty slow, maybe it is because my server and
> > > I did all tips and tricks (lazy loader, APC caching, caching queries,
> > > views) but generally it is slow and use more memory especially on the
> > > loading cake files. My question is would 2.0 version will be faster if
> > > I start using it, and does anybody has experienced performance
> > > improving? I think 2.0 should be faster :)
>
> > > Any comments are welcome.
>
> > > --
> > > Our newest site for the community: CakePHP Video Tutorials
> > >http://tv.cakephp.org
> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> > > others with their CakePHP related questions.
>
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > > athttp://groups.google.com/group/cake-php
>
> > --
> > Kind Regards
> >  Stephen
>
> >  http://www.ninjacodermonkey.co.uk

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Performance of CakePHP 2.0

2011-03-22 Thread Ziki
We are now still in developing phase, we do not have users. Maybe for
2 months it will be in beta version. Do you have any experience in 2.0
performance?

On 22 ožu, 14:40, Stephen  wrote:
> Not quite about speed, but I wouldn't really switch to 2.0 until it's stable
> and officially released - especially if your website contains a large amount
> of users
>
> On 22 March 2011 13:19, Ziki  wrote:
>
>
>
> > Hi,
>
> > I am developing complex website (business and social network) with
> > 1.3.6 version and it is pretty slow, maybe it is because my server and
> > I did all tips and tricks (lazy loader, APC caching, caching queries,
> > views) but generally it is slow and use more memory especially on the
> > loading cake files. My question is would 2.0 version will be faster if
> > I start using it, and does anybody has experienced performance
> > improving? I think 2.0 should be faster :)
>
> > Any comments are welcome.
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php
>
> --
> Kind Regards
>  Stephen
>
>  http://www.ninjacodermonkey.co.uk

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Performance of CakePHP 2.0

2011-03-22 Thread Stephen
Not quite about speed, but I wouldn't really switch to 2.0 until it's stable
and officially released - especially if your website contains a large amount
of users

On 22 March 2011 13:19, Ziki  wrote:

> Hi,
>
> I am developing complex website (business and social network) with
> 1.3.6 version and it is pretty slow, maybe it is because my server and
> I did all tips and tricks (lazy loader, APC caching, caching queries,
> views) but generally it is slow and use more memory especially on the
> loading cake files. My question is would 2.0 version will be faster if
> I start using it, and does anybody has experienced performance
> improving? I think 2.0 should be faster :)
>
> Any comments are welcome.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>



-- 
Kind Regards
 Stephen

 http://www.ninjacodermonkey.co.uk

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Performance of CakePHP 2.0

2011-03-22 Thread Ziki
Hi,

I am developing complex website (business and social network) with
1.3.6 version and it is pretty slow, maybe it is because my server and
I did all tips and tricks (lazy loader, APC caching, caching queries,
views) but generally it is slow and use more memory especially on the
loading cake files. My question is would 2.0 version will be faster if
I start using it, and does anybody has experienced performance
improving? I think 2.0 should be faster :)

Any comments are welcome.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Performance Problems using remote database

2010-11-24 Thread Thiago Elias
Probably these lines were added by the team in the very beginning of the
development for some reason and we forgot to remove because the network
performance was really good at that time and we were'nt able to notice the
problem before.

Unfortunatelly I hasn't checked bootstrap before when searching for the
solution, and that was my fault.

Well, thanks everyone. I hope this topic is useful for someone..


Atenciosamente,

*Thiago Elias Rezende Silva*
*Analista/Programador php
www.systemdevelopers.com.br
**+55 13 8113-4710*



2010/11/24 AD7six 

>
>
> On Nov 24, 5:39 pm, Thiago Elias  wrote:
> > Hey guys, long time no see..
> >
> > I was trying to solve my problem these last three months but without
> > success..
> >
> > Today, I've decided to try again some things, and for some reason I found
> > the solution..
> >
> > At bootstrap.php, I had declared three lines to get the hostname of the
> user
> > for each request, and I've figured out that my network spend long time to
> > resolve the reverse DNS.
>
> was that a surprise? why would you ever choose to do that (apparently
> for every single visitor) anyway?
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Performance Problems using remote database

2010-11-24 Thread AD7six


On Nov 24, 5:39 pm, Thiago Elias  wrote:
> Hey guys, long time no see..
>
> I was trying to solve my problem these last three months but without
> success..
>
> Today, I've decided to try again some things, and for some reason I found
> the solution..
>
> At bootstrap.php, I had declared three lines to get the hostname of the user
> for each request, and I've figured out that my network spend long time to
> resolve the reverse DNS.

was that a surprise? why would you ever choose to do that (apparently
for every single visitor) anyway?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Performance Problems using remote database

2010-11-24 Thread Thiago Elias
Hey guys, long time no see..

I was trying to solve my problem these last three months but without
success..

Today, I've decided to try again some things, and for some reason I found
the solution..

At bootstrap.php, I had declared three lines to get the hostname of the user
for each request, and I've figured out that my network spend long time to
resolve the reverse DNS.

The solution for me was just remove the following three lines I added
before:

$hostName = gethostbyaddr($_SERVER["SERVER_ADDR"]);
$hostName = gethostbyname($hostName);
define('SERVER_HOSTNAME', $hostName, true);


Now each request takes around 250ms, that is really faster than before.. :-)

Thanks everyone for the help..


Atenciosamente,

*Thiago Elias Rezende Silva*
*Analista/Programador php
www.systemdevelopers.com.br
**+55 13 8113-4710*



2010/8/16 Thiago Elias 

> Thanks jmn2k1 and djogo for the new answers here..
>
> I'm really using IP Address instead hostname for database connection..
>
> Guys, I Haven't tried the proposed solutions yet, but this week I'll try
> them all.. (these days I'm running against time to put some things in order
> here.. haha)..
>
> Thanks for the help.
>
> Thiago Elias.
>
>
> 2010/8/13 djogo 
>
>  jmn2k1, sometimes even the network routing messes with database access
>> speed... We had a problem in which every request passed by the
>> firewall, even to our own servers! The firewall couldn't handle the
>> traffic, therefore everything (internet and intranet access) was so
>> slow.
>>
>>
>> On Aug 13, 11:17 am, jmn2k1  wrote:
>> > Not necessarily your case but once I had a similar problem, it turns
>> > out I was using a hostname for the database server that need to do a
>> > DNS checkout and hence slow the app down. If you're using the ip then
>> > this is not the case.
>> >
>> > On Aug 12, 10:14 am, Thiago Elias  wrote:
>> >
>> > > Hey Guys..
>> >
>> > > Thanks everyone for the answers.. I'll try them all here today, and
>> I'll
>> > > post the results soon as possible..
>> >
>> > > 2010/8/12 djogo 
>> >
>> > > > Hi Thiago,
>> >
>> > > > I would try to replicate the entire system (lampp + your app +
>> > > > database) in other server and check whether the "slowness" is due to
>> > > > the server or not. You may also replicate a legacy PHP app, as you
>> > > > call it, to check if it works well too. This replicated server will
>> > > > allow you to test other experiments without jeopardizing your real
>> > > > production data.
>> >
>> > > > If the performance in the replicated server is equivalent to your
>> > > > original one, check if its something in the cakephp lib. Create a
>> > > > controller that doesn't use any models at all. If it's also slow,
>> than
>> > > > the problem is something about your cake, or its configuration. If
>> > > > it's not, then it's probably your database.
>> >
>> > > > Then you can start thinking about database optimization. Is all
>> > > > queries slow? Try a simple "SELECT 1 FROM DUAL" in the legacy PHP
>> and
>> > > > in cakePHP. how many milisseconds each one takes (test both on the
>> > > > browser)? Is AppController->beforeFilter doing something that may be
>> > > > slowing down your queries?
>> >
>> > > > Turn debug to 2 and for each query that it reports, check how much
>> > > > time is it taking (it's right beside the query name). Try to run the
>> > > > same query on the database directly and check if the timing is
>> > > > compatible.
>> >
>> > > > When my apps turn slow, I always think of the DB. Sometimes, it's
>> just
>> > > > a matter of creating the right indexes - for instance, if you run
>> > > > "SELECT marafo_id, count(*) from naosei group by marafo_id", it'll
>> be
>> > > > really slow when you have lots (>100K) of rows and the grouped
>> column
>> > > > is not indexed. A simple "CREATE INDEX index_naosei_marafo_id ON
>> > > > naosei (marafo_id);" would solve this problem.
>> >
>> > > > Well, keep us all informed about these results. I'm very interested
>> > > > because every once in a while I (and may I add, everybody =]) run
>> into
>> > 

Creating Performance in Mind Dynamic Nav with Caching

2010-10-21 Thread Pete
Trying to understand the best method for creating my navigation. One
of my controllers selects my top level items (which I want to be
displayed on every page as the navigation elements).

I've currently created the following in my app_controller.php file:
 function beforeRender(){
if(!$this->Session->read('nav')){
$this->Session->write('nav', $this->Controller->find('all',
array('fields'=>array('Controller.name','Controller.id';
}
$this->set('primaryNav', $this->Session->read('nav'));
  }

On my template page, I was going to add:
 echo($this->element('navigation', array('header'=>$primaryNav,
'cache'=>true)));

however it seems as if this $primaryNav is now on any page, and thus
creating this call to the element passing primaryNav seems rather
pointless (or am I wrong?).. How can I create a cache for it, since it
is something I don't expect to be changing in the near future.

Thank you

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Performance Problems using remote database

2010-08-16 Thread Thiago Elias
Thanks jmn2k1 and djogo for the new answers here..

I'm really using IP Address instead hostname for database connection..

Guys, I Haven't tried the proposed solutions yet, but this week I'll try
them all.. (these days I'm running against time to put some things in order
here.. haha)..

Thanks for the help.

Thiago Elias.


2010/8/13 djogo 

> jmn2k1, sometimes even the network routing messes with database access
> speed... We had a problem in which every request passed by the
> firewall, even to our own servers! The firewall couldn't handle the
> traffic, therefore everything (internet and intranet access) was so
> slow.
>
>
> On Aug 13, 11:17 am, jmn2k1  wrote:
> > Not necessarily your case but once I had a similar problem, it turns
> > out I was using a hostname for the database server that need to do a
> > DNS checkout and hence slow the app down. If you're using the ip then
> > this is not the case.
> >
> > On Aug 12, 10:14 am, Thiago Elias  wrote:
> >
> > > Hey Guys..
> >
> > > Thanks everyone for the answers.. I'll try them all here today, and
> I'll
> > > post the results soon as possible..
> >
> > > 2010/8/12 djogo 
> >
> > > > Hi Thiago,
> >
> > > > I would try to replicate the entire system (lampp + your app +
> > > > database) in other server and check whether the "slowness" is due to
> > > > the server or not. You may also replicate a legacy PHP app, as you
> > > > call it, to check if it works well too. This replicated server will
> > > > allow you to test other experiments without jeopardizing your real
> > > > production data.
> >
> > > > If the performance in the replicated server is equivalent to your
> > > > original one, check if its something in the cakephp lib. Create a
> > > > controller that doesn't use any models at all. If it's also slow,
> than
> > > > the problem is something about your cake, or its configuration. If
> > > > it's not, then it's probably your database.
> >
> > > > Then you can start thinking about database optimization. Is all
> > > > queries slow? Try a simple "SELECT 1 FROM DUAL" in the legacy PHP and
> > > > in cakePHP. how many milisseconds each one takes (test both on the
> > > > browser)? Is AppController->beforeFilter doing something that may be
> > > > slowing down your queries?
> >
> > > > Turn debug to 2 and for each query that it reports, check how much
> > > > time is it taking (it's right beside the query name). Try to run the
> > > > same query on the database directly and check if the timing is
> > > > compatible.
> >
> > > > When my apps turn slow, I always think of the DB. Sometimes, it's
> just
> > > > a matter of creating the right indexes - for instance, if you run
> > > > "SELECT marafo_id, count(*) from naosei group by marafo_id", it'll be
> > > > really slow when you have lots (>100K) of rows and the grouped column
> > > > is not indexed. A simple "CREATE INDEX index_naosei_marafo_id ON
> > > > naosei (marafo_id);" would solve this problem.
> >
> > > > Well, keep us all informed about these results. I'm very interested
> > > > because every once in a while I (and may I add, everybody =]) run
> into
> > > > this kind of problem too.
> >
> > > > dfcp
> >
> > > > On 11 ago, 22:29, Thiago Elias  wrote:
> > > > > Hi All,
> >
> > > > > Since two or three months ago (more or less), I'm experiencing some
> > > > problems
> > > > > involving CakePHP.
> >
> > > > > In the past, our application was using a local database connection,
> and
> > > > > performance was really nice and acceptable. Some months ago, we had
> to
> > > > > migrate the application to another server, separating the Data and
> the
> > > > Apps.
> >
> > > > > After this change, I've lost performance in my cake App. Each
> request
> > > > takes
> > > > > around 10 ~ 15 seconds, and before, was 2 ~ 3,5 secs.
> > > > > The interesting thing is: The other legacy PHP Apps are 100% fast,
> and
> > > > even
> > > > > other cakeAPPs are fast too, but the difference is: My main cake
> app (the
> > > > > one that lost performance) have 80 inno

Re: Performance Problems using remote database

2010-08-13 Thread djogo
jmn2k1, sometimes even the network routing messes with database access
speed... We had a problem in which every request passed by the
firewall, even to our own servers! The firewall couldn't handle the
traffic, therefore everything (internet and intranet access) was so
slow.


On Aug 13, 11:17 am, jmn2k1  wrote:
> Not necessarily your case but once I had a similar problem, it turns
> out I was using a hostname for the database server that need to do a
> DNS checkout and hence slow the app down. If you're using the ip then
> this is not the case.
>
> On Aug 12, 10:14 am, Thiago Elias  wrote:
>
> > Hey Guys..
>
> > Thanks everyone for the answers.. I'll try them all here today, and I'll
> > post the results soon as possible..
>
> > 2010/8/12 djogo 
>
> > > Hi Thiago,
>
> > > I would try to replicate the entire system (lampp + your app +
> > > database) in other server and check whether the "slowness" is due to
> > > the server or not. You may also replicate a legacy PHP app, as you
> > > call it, to check if it works well too. This replicated server will
> > > allow you to test other experiments without jeopardizing your real
> > > production data.
>
> > > If the performance in the replicated server is equivalent to your
> > > original one, check if its something in the cakephp lib. Create a
> > > controller that doesn't use any models at all. If it's also slow, than
> > > the problem is something about your cake, or its configuration. If
> > > it's not, then it's probably your database.
>
> > > Then you can start thinking about database optimization. Is all
> > > queries slow? Try a simple "SELECT 1 FROM DUAL" in the legacy PHP and
> > > in cakePHP. how many milisseconds each one takes (test both on the
> > > browser)? Is AppController->beforeFilter doing something that may be
> > > slowing down your queries?
>
> > > Turn debug to 2 and for each query that it reports, check how much
> > > time is it taking (it's right beside the query name). Try to run the
> > > same query on the database directly and check if the timing is
> > > compatible.
>
> > > When my apps turn slow, I always think of the DB. Sometimes, it's just
> > > a matter of creating the right indexes - for instance, if you run
> > > "SELECT marafo_id, count(*) from naosei group by marafo_id", it'll be
> > > really slow when you have lots (>100K) of rows and the grouped column
> > > is not indexed. A simple "CREATE INDEX index_naosei_marafo_id ON
> > > naosei (marafo_id);" would solve this problem.
>
> > > Well, keep us all informed about these results. I'm very interested
> > > because every once in a while I (and may I add, everybody =]) run into
> > > this kind of problem too.
>
> > > dfcp
>
> > > On 11 ago, 22:29, Thiago Elias  wrote:
> > > > Hi All,
>
> > > > Since two or three months ago (more or less), I'm experiencing some
> > > problems
> > > > involving CakePHP.
>
> > > > In the past, our application was using a local database connection, and
> > > > performance was really nice and acceptable. Some months ago, we had to
> > > > migrate the application to another server, separating the Data and the
> > > Apps.
>
> > > > After this change, I've lost performance in my cake App. Each request
> > > takes
> > > > around 10 ~ 15 seconds, and before, was 2 ~ 3,5 secs.
> > > > The interesting thing is: The other legacy PHP Apps are 100% fast, and
> > > even
> > > > other cakeAPPs are fast too, but the difference is: My main cake app 
> > > > (the
> > > > one that lost performance) have 80 innoDB Tables and 20 views. (used to
> > > link
> > > > to another databases).
>
> > > > I'm using CakePHP 1.2.7, PHP 5.2. And in the Database Server, MySQL
> > > Server
> > > > 5.1.
> > > > Our network infrastructure is really fast, and ping response between
> > > servers
> > > > is really nice.
>
> > > > Does anyone knows why I'm losing performance just in this App when
> > > connected
> > > > to a remote server ?! I'm using CakePHP Debug, and ~85% of the time 
> > > > spent
> > > in
> > > > the request is lost in the CORE, and not in the app. (The core is the
> > > same
> > > > of the other cakeApps..)
>

Re: Performance Problems using remote database

2010-08-13 Thread jmn2k1
Not necessarily your case but once I had a similar problem, it turns
out I was using a hostname for the database server that need to do a
DNS checkout and hence slow the app down. If you're using the ip then
this is not the case.

On Aug 12, 10:14 am, Thiago Elias  wrote:
> Hey Guys..
>
> Thanks everyone for the answers.. I'll try them all here today, and I'll
> post the results soon as possible..
>
> 2010/8/12 djogo 
>
> > Hi Thiago,
>
> > I would try to replicate the entire system (lampp + your app +
> > database) in other server and check whether the "slowness" is due to
> > the server or not. You may also replicate a legacy PHP app, as you
> > call it, to check if it works well too. This replicated server will
> > allow you to test other experiments without jeopardizing your real
> > production data.
>
> > If the performance in the replicated server is equivalent to your
> > original one, check if its something in the cakephp lib. Create a
> > controller that doesn't use any models at all. If it's also slow, than
> > the problem is something about your cake, or its configuration. If
> > it's not, then it's probably your database.
>
> > Then you can start thinking about database optimization. Is all
> > queries slow? Try a simple "SELECT 1 FROM DUAL" in the legacy PHP and
> > in cakePHP. how many milisseconds each one takes (test both on the
> > browser)? Is AppController->beforeFilter doing something that may be
> > slowing down your queries?
>
> > Turn debug to 2 and for each query that it reports, check how much
> > time is it taking (it's right beside the query name). Try to run the
> > same query on the database directly and check if the timing is
> > compatible.
>
> > When my apps turn slow, I always think of the DB. Sometimes, it's just
> > a matter of creating the right indexes - for instance, if you run
> > "SELECT marafo_id, count(*) from naosei group by marafo_id", it'll be
> > really slow when you have lots (>100K) of rows and the grouped column
> > is not indexed. A simple "CREATE INDEX index_naosei_marafo_id ON
> > naosei (marafo_id);" would solve this problem.
>
> > Well, keep us all informed about these results. I'm very interested
> > because every once in a while I (and may I add, everybody =]) run into
> > this kind of problem too.
>
> > dfcp
>
> > On 11 ago, 22:29, Thiago Elias  wrote:
> > > Hi All,
>
> > > Since two or three months ago (more or less), I'm experiencing some
> > problems
> > > involving CakePHP.
>
> > > In the past, our application was using a local database connection, and
> > > performance was really nice and acceptable. Some months ago, we had to
> > > migrate the application to another server, separating the Data and the
> > Apps.
>
> > > After this change, I've lost performance in my cake App. Each request
> > takes
> > > around 10 ~ 15 seconds, and before, was 2 ~ 3,5 secs.
> > > The interesting thing is: The other legacy PHP Apps are 100% fast, and
> > even
> > > other cakeAPPs are fast too, but the difference is: My main cake app (the
> > > one that lost performance) have 80 innoDB Tables and 20 views. (used to
> > link
> > > to another databases).
>
> > > I'm using CakePHP 1.2.7, PHP 5.2. And in the Database Server, MySQL
> > Server
> > > 5.1.
> > > Our network infrastructure is really fast, and ping response between
> > servers
> > > is really nice.
>
> > > Does anyone knows why I'm losing performance just in this App when
> > connected
> > > to a remote server ?! I'm using CakePHP Debug, and ~85% of the time spent
> > in
> > > the request is lost in the CORE, and not in the app. (The core is the
> > same
> > > of the other cakeApps..)
>
> > > Please help-me (and sorry for my bad english).
>
> > > Thiago Elias
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Performance Problems using remote database

2010-08-12 Thread Thiago Elias
Hey Guys..

Thanks everyone for the answers.. I'll try them all here today, and I'll
post the results soon as possible..



2010/8/12 djogo 

> Hi Thiago,
>
> I would try to replicate the entire system (lampp + your app +
> database) in other server and check whether the "slowness" is due to
> the server or not. You may also replicate a legacy PHP app, as you
> call it, to check if it works well too. This replicated server will
> allow you to test other experiments without jeopardizing your real
> production data.
>
> If the performance in the replicated server is equivalent to your
> original one, check if its something in the cakephp lib. Create a
> controller that doesn't use any models at all. If it's also slow, than
> the problem is something about your cake, or its configuration. If
> it's not, then it's probably your database.
>
> Then you can start thinking about database optimization. Is all
> queries slow? Try a simple "SELECT 1 FROM DUAL" in the legacy PHP and
> in cakePHP. how many milisseconds each one takes (test both on the
> browser)? Is AppController->beforeFilter doing something that may be
> slowing down your queries?
>
> Turn debug to 2 and for each query that it reports, check how much
> time is it taking (it's right beside the query name). Try to run the
> same query on the database directly and check if the timing is
> compatible.
>
> When my apps turn slow, I always think of the DB. Sometimes, it's just
> a matter of creating the right indexes - for instance, if you run
> "SELECT marafo_id, count(*) from naosei group by marafo_id", it'll be
> really slow when you have lots (>100K) of rows and the grouped column
> is not indexed. A simple "CREATE INDEX index_naosei_marafo_id ON
> naosei (marafo_id);" would solve this problem.
>
> Well, keep us all informed about these results. I'm very interested
> because every once in a while I (and may I add, everybody =]) run into
> this kind of problem too.
>
> dfcp
>
>
>
>
> On 11 ago, 22:29, Thiago Elias  wrote:
> > Hi All,
> >
> > Since two or three months ago (more or less), I'm experiencing some
> problems
> > involving CakePHP.
> >
> > In the past, our application was using a local database connection, and
> > performance was really nice and acceptable. Some months ago, we had to
> > migrate the application to another server, separating the Data and the
> Apps.
> >
> > After this change, I've lost performance in my cake App. Each request
> takes
> > around 10 ~ 15 seconds, and before, was 2 ~ 3,5 secs.
> > The interesting thing is: The other legacy PHP Apps are 100% fast, and
> even
> > other cakeAPPs are fast too, but the difference is: My main cake app (the
> > one that lost performance) have 80 innoDB Tables and 20 views. (used to
> link
> > to another databases).
> >
> > I'm using CakePHP 1.2.7, PHP 5.2. And in the Database Server, MySQL
> Server
> > 5.1.
> > Our network infrastructure is really fast, and ping response between
> servers
> > is really nice.
> >
> > Does anyone knows why I'm losing performance just in this App when
> connected
> > to a remote server ?! I'm using CakePHP Debug, and ~85% of the time spent
> in
> > the request is lost in the CORE, and not in the app. (The core is the
> same
> > of the other cakeApps..)
> >
> > Please help-me (and sorry for my bad english).
> >
> > Thiago Elias
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Performance Problems using remote database

2010-08-12 Thread djogo
Hi Thiago,

I would try to replicate the entire system (lampp + your app +
database) in other server and check whether the "slowness" is due to
the server or not. You may also replicate a legacy PHP app, as you
call it, to check if it works well too. This replicated server will
allow you to test other experiments without jeopardizing your real
production data.

If the performance in the replicated server is equivalent to your
original one, check if its something in the cakephp lib. Create a
controller that doesn't use any models at all. If it's also slow, than
the problem is something about your cake, or its configuration. If
it's not, then it's probably your database.

Then you can start thinking about database optimization. Is all
queries slow? Try a simple "SELECT 1 FROM DUAL" in the legacy PHP and
in cakePHP. how many milisseconds each one takes (test both on the
browser)? Is AppController->beforeFilter doing something that may be
slowing down your queries?

Turn debug to 2 and for each query that it reports, check how much
time is it taking (it's right beside the query name). Try to run the
same query on the database directly and check if the timing is
compatible.

When my apps turn slow, I always think of the DB. Sometimes, it's just
a matter of creating the right indexes - for instance, if you run
"SELECT marafo_id, count(*) from naosei group by marafo_id", it'll be
really slow when you have lots (>100K) of rows and the grouped column
is not indexed. A simple "CREATE INDEX index_naosei_marafo_id ON
naosei (marafo_id);" would solve this problem.

Well, keep us all informed about these results. I'm very interested
because every once in a while I (and may I add, everybody =]) run into
this kind of problem too.

dfcp




On 11 ago, 22:29, Thiago Elias  wrote:
> Hi All,
>
> Since two or three months ago (more or less), I'm experiencing some problems
> involving CakePHP.
>
> In the past, our application was using a local database connection, and
> performance was really nice and acceptable. Some months ago, we had to
> migrate the application to another server, separating the Data and the Apps.
>
> After this change, I've lost performance in my cake App. Each request takes
> around 10 ~ 15 seconds, and before, was 2 ~ 3,5 secs.
> The interesting thing is: The other legacy PHP Apps are 100% fast, and even
> other cakeAPPs are fast too, but the difference is: My main cake app (the
> one that lost performance) have 80 innoDB Tables and 20 views. (used to link
> to another databases).
>
> I'm using CakePHP 1.2.7, PHP 5.2. And in the Database Server, MySQL Server
> 5.1.
> Our network infrastructure is really fast, and ping response between servers
> is really nice.
>
> Does anyone knows why I'm losing performance just in this App when connected
> to a remote server ?! I'm using CakePHP Debug, and ~85% of the time spent in
> the request is lost in the CORE, and not in the app. (The core is the same
> of the other cakeApps..)
>
> Please help-me (and sorry for my bad english).
>
> Thiago Elias

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Performance Problems using remote database

2010-08-11 Thread Zaky Katalan-Ezra
Check the database without the application, if you can, by issuing queries
from the application server to the db server.
Use myphpadmin or console, if its still slow you should leave cake aside and
concentrate only in the database server.

On Thu, Aug 12, 2010 at 7:34 AM, O.J. Tibi  wrote:

> Hi Thiago,
>
> I'll be thinking out loud here, I know you may or may not agree with
> me as you're probably more experienced, but I'll still write them down
> so you can hopefully get some ideas.
>
> 1) Caching - Have you tried turning the cache on? Or maybe one caching
> engine doesn't work well with your infrastructure and you might want
> to change to another engine?
>
> 2) Table indexes - You mentioned that before you have a 2 ~ 3,5
> response time from the app, it might be possible that you forgot to
> add or change indexes in your tables? Data grows exponentially and
> your indexes might no longer be relevent. A fast query from the early
> days of your database may not be as fast when you have a lot of rows
> inserted.
>
> 3) Column types and joins - The database server takes an additional
> toll casting column types of foreign keys included in a join. Try to
> check if your key columns are uniform.
>
> 4) Pulling as much data as practical - While CakePHP's caching is
> superb, it can only cache views out-of-the-box. If you want to cache
> your queries, pull from the database as much as practical for your
> application and store it using the caching engine. If that's not
> possible at the moment, set this data to the view before the view is
> cached. Doing this, you will be able to do manipulations on your data
> set in the view, even after the cache is generated. Remember, *only*
> pull out as much data as practically possible.
>
> 5) Use Containable, if much is too much - More often than not, using
> CakePHP's associations and how it pulls records out of a find() will
> also get you the associated data with the primary model you're working
> on. This may cause a lot unused data being sent over the network,
> congesting it and may make your application sluggish. If you're not
> using the models associated with your primary model, make sure to mark
> them with the Containable behavior and flag the 'contain' key in your
> find() and $this->paginate arrays accordingly.
>
> HTH,
> OJ
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Regards,
Zaky Katalan-Ezra
QA Administrator
www.IGeneriX.com
Sites.IGeneriX.com
054-7762312

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Performance Problems using remote database

2010-08-11 Thread O.J. Tibi
Hi Thiago,

I'll be thinking out loud here, I know you may or may not agree with
me as you're probably more experienced, but I'll still write them down
so you can hopefully get some ideas.

1) Caching - Have you tried turning the cache on? Or maybe one caching
engine doesn't work well with your infrastructure and you might want
to change to another engine?

2) Table indexes - You mentioned that before you have a 2 ~ 3,5
response time from the app, it might be possible that you forgot to
add or change indexes in your tables? Data grows exponentially and
your indexes might no longer be relevent. A fast query from the early
days of your database may not be as fast when you have a lot of rows
inserted.

3) Column types and joins - The database server takes an additional
toll casting column types of foreign keys included in a join. Try to
check if your key columns are uniform.

4) Pulling as much data as practical - While CakePHP's caching is
superb, it can only cache views out-of-the-box. If you want to cache
your queries, pull from the database as much as practical for your
application and store it using the caching engine. If that's not
possible at the moment, set this data to the view before the view is
cached. Doing this, you will be able to do manipulations on your data
set in the view, even after the cache is generated. Remember, *only*
pull out as much data as practically possible.

5) Use Containable, if much is too much - More often than not, using
CakePHP's associations and how it pulls records out of a find() will
also get you the associated data with the primary model you're working
on. This may cause a lot unused data being sent over the network,
congesting it and may make your application sluggish. If you're not
using the models associated with your primary model, make sure to mark
them with the Containable behavior and flag the 'contain' key in your
find() and $this->paginate arrays accordingly.

HTH,
OJ

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Performance Problems using remote database

2010-08-11 Thread Thiago Elias
Thanks for the answer, Cricket.

Well. I'm not using Debugger class, neither Debug > 0.(I've used to find out
where the problem was happening, but I've disabled them). I've suspected of
connection problems, but it's strange, because the other cakePHP Apps (using
the same core) are really fast.

I think I'll have to create another test environment to re-create the
problem in another place to see if the poor performance will be the same.

Any other ideas ?!

Thanks a lot for all the help.

Thiago Elias.


2010/8/11 cricket 

> On Wed, Aug 11, 2010 at 9:29 PM, Thiago Elias 
> wrote:
> > Hi All,
> >
> > Since two or three months ago (more or less), I'm experiencing some
> problems
> > involving CakePHP.
> >
> > In the past, our application was using a local database connection, and
> > performance was really nice and acceptable. Some months ago, we had to
> > migrate the application to another server, separating the Data and the
> Apps.
> >
> > After this change, I've lost performance in my cake App. Each request
> takes
> > around 10 ~ 15 seconds, and before, was 2 ~ 3,5 secs.
> > The interesting thing is: The other legacy PHP Apps are 100% fast, and
> even
> > other cakeAPPs are fast too, but the difference is: My main cake app (the
> > one that lost performance) have 80 innoDB Tables and 20 views. (used to
> link
> > to another databases).
> >
> > I'm using CakePHP 1.2.7, PHP 5.2. And in the Database Server, MySQL
> Server
> > 5.1.
> > Our network infrastructure is really fast, and ping response between
> servers
> > is really nice.
> >
> > Does anyone knows why I'm losing performance just in this App when
> connected
> > to a remote server ?!
>
> Have you looked into whether the remote connection is the issue? I
> mean, aside from Cake. I'd guess that you have a connection problem.
>
> >I'm using CakePHP Debug, and ~85% of the time spent in
> > the request is lost in the CORE, and not in the app. (The core is the
> same
> > of the other cakeApps..)
>
> Having debug > 0 or using the Debugger class is *guaranteed* to slow
> your app down.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Performance Problems using remote database

2010-08-11 Thread cricket
On Wed, Aug 11, 2010 at 9:29 PM, Thiago Elias  wrote:
> Hi All,
>
> Since two or three months ago (more or less), I'm experiencing some problems
> involving CakePHP.
>
> In the past, our application was using a local database connection, and
> performance was really nice and acceptable. Some months ago, we had to
> migrate the application to another server, separating the Data and the Apps.
>
> After this change, I've lost performance in my cake App. Each request takes
> around 10 ~ 15 seconds, and before, was 2 ~ 3,5 secs.
> The interesting thing is: The other legacy PHP Apps are 100% fast, and even
> other cakeAPPs are fast too, but the difference is: My main cake app (the
> one that lost performance) have 80 innoDB Tables and 20 views. (used to link
> to another databases).
>
> I'm using CakePHP 1.2.7, PHP 5.2. And in the Database Server, MySQL Server
> 5.1.
> Our network infrastructure is really fast, and ping response between servers
> is really nice.
>
> Does anyone knows why I'm losing performance just in this App when connected
> to a remote server ?!

Have you looked into whether the remote connection is the issue? I
mean, aside from Cake. I'd guess that you have a connection problem.

>I'm using CakePHP Debug, and ~85% of the time spent in
> the request is lost in the CORE, and not in the app. (The core is the same
> of the other cakeApps..)

Having debug > 0 or using the Debugger class is *guaranteed* to slow
your app down.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Performance Problems using remote database

2010-08-11 Thread Thiago Elias
Hi All,

Since two or three months ago (more or less), I'm experiencing some problems
involving CakePHP.

In the past, our application was using a local database connection, and
performance was really nice and acceptable. Some months ago, we had to
migrate the application to another server, separating the Data and the Apps.

After this change, I've lost performance in my cake App. Each request takes
around 10 ~ 15 seconds, and before, was 2 ~ 3,5 secs.
The interesting thing is: The other legacy PHP Apps are 100% fast, and even
other cakeAPPs are fast too, but the difference is: My main cake app (the
one that lost performance) have 80 innoDB Tables and 20 views. (used to link
to another databases).

I'm using CakePHP 1.2.7, PHP 5.2. And in the Database Server, MySQL Server
5.1.
Our network infrastructure is really fast, and ping response between servers
is really nice.

Does anyone knows why I'm losing performance just in this App when connected
to a remote server ?! I'm using CakePHP Debug, and ~85% of the time spent in
the request is lost in the CORE, and not in the app. (The core is the same
of the other cakeApps..)

Please help-me (and sorry for my bad english).

Thiago Elias

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Discussion on optimizing-cakes-performance

2010-07-18 Thread saidbakr
I'd like to see an example regarding the Database Configuration. In
other word an SQL structure dump. Sorry, it is just a new pie request.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP 1.3.2 Performance under load

2010-07-15 Thread Matthew Porter
Thanks one and all for the very informative responses.

Suffice to say, I think CakePHP will be fine for my needs.  Granted,
it's not the fastest or necessarily the most extensive framework ...
but heck, it's just so darn beautiful! :D

Cheers,

Matthew

On Jul 15, 8:56 pm, "Mike Karthauser"  wrote:
> On Thu, July 15, 2010 11:37 am, ohcibi wrote:
> > is suggest you visiting:
> >http://book.cakephp.org/view/510/Sites-in-the-wild
> > for sites that use cakephp and just try them how they feel check
> > out addons.mozilla.org as they are using cakephp as well and should
> > have some traffic on their sites...
>
> google addons are migration to django if they havent 
> already.http://micropipes.com/blog/2009/11/17/amo-development-changes-in-2010/
>
> --
> Mike Karthauser
> Managing Director - Brightstorm Ltd
>
> Email: mi...@brightstorm.co.uk
> Web:http://www.brightstorm.co.uk
> Tel:  07939 252144 (mobile)
> Fax: 0870 1320560
>
> Address: 1 Brewery Court, North Street, Bristol, BS3 1JS

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP 1.3.2 Performance under load

2010-07-15 Thread Mike Karthauser

On Thu, July 15, 2010 11:37 am, ohcibi wrote:

> is suggest you visiting:
> http://book.cakephp.org/view/510/Sites-in-the-wild
> for sites that use cakephp and just try them how they feel check
> out addons.mozilla.org as they are using cakephp as well and should
> have some traffic on their sites...

google addons are migration to django if they havent already.
http://micropipes.com/blog/2009/11/17/amo-development-changes-in-2010/

-- 
Mike Karthauser
Managing Director - Brightstorm Ltd

Email: mi...@brightstorm.co.uk
Web: http://www.brightstorm.co.uk
Tel:  07939 252144 (mobile)
Fax: 0870 1320560

Address: 1 Brewery Court, North Street, Bristol, BS3 1JS

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP 1.3.2 Performance under load

2010-07-15 Thread ohcibi
I don't know about any follow up test but i do know that a hello world
application is not even meant to be done with a framework like
cakephp. So if a new benchmark would really follow up the old
benchmark it would produce the same useless result as with the cake
1.1 benchmark

is suggest you visiting: http://book.cakephp.org/view/510/Sites-in-the-wild
for sites that use cakephp and just try them how they feel check
out addons.mozilla.org as they are using cakephp as well and should
have some traffic on their sites...

but afair performance improvements where mentioned in the 1.3
announcement at the bakery

On 15 Jul., 06:56, Matthew Porter
 wrote:
> Thanks @ohcibi
>
> Yes, I realise the article is old ... however, it is still not
> flattering for Cake.
>
> It would be ideal if there was a follow-up test, or even something
> from the Cake team indicating how to get the best performance out of
> the framework to address these concerns.
>
> To the uninitiated, it might appear that Cake's performance is
> lacking.  The Cookbook really needs some performance examples and
> statistics to help build confidence in the framework.
>
> Don't get me wrong, I think Cake is awesome.  I just wish I didn't
> have this nagging concern about performance.  It's pretty hard to
> ignore a performance difference so large between Cake and CI, even on
> an old version; especially when there is some evidence to suggest that
> later versions performed worse as RC.
>
> I really was just hoping that someone could tell me that 1.3.x
> introduced some performance improvements and tuning suggestions into
> the Cookbook and release notes.
>
> Thanks again everyone! :)
>
> Matthew
>
> On Jul 15, 10:14 am, ohcibi  wrote:
>
>
>
> > > I have read some articles suggesting the performance of CakePHP 1.2 is
> > > well behind that of comparable frameworks under load.
> > > In particular, one article (found 
> > > here:http://www.sellersrank.com/php/cakephp-codeigniter-benchmark/)
> > > Alternatively, can anyone comment on the validity or otherwise of the
> > > article link above?
>
> > the link is from 2006 and he was benchmarking CakePHP 1.1 not 1.2 (1.2
> > was not even out there in 2006).
>
> > Tuning is (like many other topic) not well documented in cake, thats
> > true. Caching is though, have a look into the book...

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP 1.3.2 Performance under load

2010-07-14 Thread Matthew Porter
Thanks @ohcibi

Yes, I realise the article is old ... however, it is still not
flattering for Cake.

It would be ideal if there was a follow-up test, or even something
from the Cake team indicating how to get the best performance out of
the framework to address these concerns.

To the uninitiated, it might appear that Cake's performance is
lacking.  The Cookbook really needs some performance examples and
statistics to help build confidence in the framework.

Don't get me wrong, I think Cake is awesome.  I just wish I didn't
have this nagging concern about performance.  It's pretty hard to
ignore a performance difference so large between Cake and CI, even on
an old version; especially when there is some evidence to suggest that
later versions performed worse as RC.

I really was just hoping that someone could tell me that 1.3.x
introduced some performance improvements and tuning suggestions into
the Cookbook and release notes.

Thanks again everyone! :)

Matthew

On Jul 15, 10:14 am, ohcibi  wrote:
> > I have read some articles suggesting the performance of CakePHP 1.2 is
> > well behind that of comparable frameworks under load.
> > In particular, one article (found 
> > here:http://www.sellersrank.com/php/cakephp-codeigniter-benchmark/)
> > Alternatively, can anyone comment on the validity or otherwise of the
> > article link above?
>
> the link is from 2006 and he was benchmarking CakePHP 1.1 not 1.2 (1.2
> was not even out there in 2006).
>
> Tuning is (like many other topic) not well documented in cake, thats
> true. Caching is though, have a look into the book...

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP 1.3.2 Performance under load

2010-07-14 Thread ohcibi
> I have read some articles suggesting the performance of CakePHP 1.2 is
> well behind that of comparable frameworks under load.

> In particular, one article (found 
> here:http://www.sellersrank.com/php/cakephp-codeigniter-benchmark/)

> Alternatively, can anyone comment on the validity or otherwise of the
> article link above?

the link is from 2006 and he was benchmarking CakePHP 1.1 not 1.2 (1.2
was not even out there in 2006).

Tuning is (like many other topic) not well documented in cake, thats
true. Caching is though, have a look into the book...

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP 1.3.2 Performance under load

2010-07-14 Thread Matthew Porter
Thanks everyone.

Seems CakePHP can handle some serious load.  It's a pity there isn't
more information on this and performance tuning tips in the Cookbook.

It's also a shame there is no mention of performance improvements in
the release notes for each version.

Something CakePHP really needs to work on, I think.

That said, it is awesome how quickly an application can be put
together in CakePHP!

Thanks all.

Matthew

On Jul 15, 1:15 am, keymaster  wrote:
> See the following thread describing some of the highest traffic cake
> sites...
>
> http://groups.google.com/group/cake-php/browse_thread/thread/a87ac46d...

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP 1.3.2 Performance under load

2010-07-14 Thread keymaster
See the following thread describing some of the highest traffic cake
sites...

http://groups.google.com/group/cake-php/browse_thread/thread/a87ac46d4f590566/e2c097afb7eda061?lnk=gst&q=cakephp+high+traffic+sites#

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP 1.3.2 Performance under load

2010-07-14 Thread Mike Karthauser
hi matthew

On Wed, July 14, 2010 5:44 am, Matthew Porter wrote:
> Hi everyone,
>
> I am currently investigating CakePHP for an upcoming project, however
> I have read some articles suggesting the performance of CakePHP 1.2 is
> well behind that of comparable frameworks under load.
>
> In particular, one article (found here:
> http://www.sellersrank.com/php/cakephp-codeigniter-benchmark/)
> suggested that CakePHP could only handle 10-30% the number of requests
> per second of frameworks like Zend and CodeIgniter.
>
> Can anyone here provide real evidence (i.e. formal test results) to
> suggest performance of 1.3.2 is much better?  Perhaps the results
> shown on the link did not take into account performance tuning of the
> framework?
>
> Alternatively, can anyone comment on the validity or otherwise of the
> article link above?
>
> I would love to use CakePHP for this project, as it is clearly a very
> rapid development tool ... but am a little concerned about a lack of
> performance at run-time.
>
> Many thanks for your kindness in advance!

we (who i contract for) have got a number of high traffic sites running
off cake 1.2.* but they have had a fair amount of magic woven using mcache
and custom flat caching components (which we've written). providing you
sort object/ view caching then cake will take any traffic.

We've had sites running 30,000 server impressions a day out of the box, no
object or flat caching, up to 8 million and more for fully cached and
flatfiled (www.cyclingnews.com towards the end of last years tour de
france).

IMHO benchmarking provides very little relation to real world performance
as this gets into how good your hardware/ network/ how much memory etc).

if you are at cakefest, you can hear andy gale describing what he did to
improve this little documented aspect of cakephp.




-- 
Mike Karthauser
Managing Director - Brightstorm Ltd

Email: mi...@brightstorm.co.uk
Web: http://www.brightstorm.co.uk
Tel:  07939 252144 (mobile)
Fax: 0870 1320560

Address: 1 Brewery Court, North Street, Bristol, BS3 1JS

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


CakePHP 1.3.2 Performance under load

2010-07-14 Thread Matthew Porter
Hi everyone,

I am currently investigating CakePHP for an upcoming project, however
I have read some articles suggesting the performance of CakePHP 1.2 is
well behind that of comparable frameworks under load.

In particular, one article (found here: 
http://www.sellersrank.com/php/cakephp-codeigniter-benchmark/)
suggested that CakePHP could only handle 10-30% the number of requests
per second of frameworks like Zend and CodeIgniter.

Can anyone here provide real evidence (i.e. formal test results) to
suggest performance of 1.3.2 is much better?  Perhaps the results
shown on the link did not take into account performance tuning of the
framework?

Alternatively, can anyone comment on the validity or otherwise of the
article link above?

I would love to use CakePHP for this project, as it is clearly a very
rapid development tool ... but am a little concerned about a lack of
performance at run-time.

Many thanks for your kindness in advance!

Matthew

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Speed and performance

2010-06-10 Thread Dr. Loboto
If you think that problem is in models loading, get rid of persistent
associations and create them on the fly. Same for using models in
controllers - empty $uses and $this->loadModel()

On Jun 11, 2:00 am, "Alan Asher"  wrote:
> I am dealing with a site that is probably larger than had originally been
> thought of when the designers made CakePHP.  I have already invested 4
> months in development and now that I have a user base it bogs down a lot
> when about 5 users get on at the same time.  I'm hoping to have thousands of
> users on at the same time.
>
> I have set up cache to cache most of the layout since it doesn't change but
> from day to day or every two minutes.  I'm using file cache and wonder if it
> would help switching to APC.  I have an ubuntu server that I control
> completely and have already taken the initial steps to install APC, but I
> haven't converted my cache config to use it yet.
>
> I see a problem with the amount of recursion in the models classes.  I'm
> using the "contains" on ALL of my queries so that the queries run faster,
> but I think that when cake loads the models and all it's recursions, it
> takes forever since I have 88 tables that all relate to the user some how.
>
> Does anyone have suggestions?
>
> Alan

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Speed and performance

2010-06-10 Thread bdwilton
I'd suggest you look at DebugKit to see if you have a bottle neck 
somewhere in your code.  Also check the performance of your machine, if 
its a virtual box you may be lacking memory or resources.


Brett.


http://wiltonsoftware.com


On 11/06/2010 7:00 a.m., Alan Asher wrote:


I am dealing with a site that is probably larger than had originally 
been thought of when the designers made CakePHP.  I have already 
invested 4 months in development and now that I have a user base it 
bogs down a lot when about 5 users get on at the same time.  I'm 
hoping to have thousands of users on at the same time.


I have set up cache to cache most of the layout since it doesn't 
change but from day to day or every two minutes.  I'm using file cache 
and wonder if it would help switching to APC.  I have an ubuntu server 
that I control completely and have already taken the initial steps to 
install APC, but I haven't converted my cache config to use it yet.


I see a problem with the amount of recursion in the models classes.  
I'm using the "contains" on ALL of my queries so that the queries run 
faster, but I think that when cake loads the models and all it's 
recursions, it takes forever since I have 88 tables that all relate to 
the user some how.


Does anyone have suggestions?

Alan




Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Speed and performance

2010-06-10 Thread Keve Kutner
Hi!

In one of the projects I worked on, we used cakephp as a dynamic ad server
(reading fresh data from mysql) and it could serve 800.000 hits / day so
cake is not that slow :)

Of course we used memcached and apc.

Thisk

On Jun 10, 2010 9:01 PM, "Alan Asher"  wrote:

 I am dealing with a site that is probably larger than had originally been
thought of when the designers made CakePHP.  I have already invested 4
months in development and now that I have a user base it bogs down a lot
when about 5 users get on at the same time.  I’m hoping to have thousands of
users on at the same time.



I have set up cache to cache most of the layout since it doesn’t change but
from day to day or every two minutes.  I’m using file cache and wonder if it
would help switching to APC.  I have an ubuntu server that I control
completely and have already taken the initial steps to install APC, but I
haven’t converted my cache config to use it yet.



I see a problem with the amount of recursion in the models classes.  I’m
using the “contains” on ALL of my queries so that the queries run faster,
but I think that when cake loads the models and all it’s recursions, it
takes forever since I have 88 tables that all relate to the user some how.



Does anyone have suggestions?



Alan

Check out the new CakePHP Questions site http://cakeqs.org and help others
with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.comFor
more options, visit this group at
http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Speed and performance

2010-06-10 Thread Miles J
How many queries on average are called per page? And what is the
average load time?

I haev thousands of users and a large forum system, and dont really
hit much speed.
Im not using memcache or APC either.

On Jun 10, 12:00 pm, "Alan Asher"  wrote:
> I am dealing with a site that is probably larger than had originally been
> thought of when the designers made CakePHP.  I have already invested 4
> months in development and now that I have a user base it bogs down a lot
> when about 5 users get on at the same time.  I'm hoping to have thousands of
> users on at the same time.
>
> I have set up cache to cache most of the layout since it doesn't change but
> from day to day or every two minutes.  I'm using file cache and wonder if it
> would help switching to APC.  I have an ubuntu server that I control
> completely and have already taken the initial steps to install APC, but I
> haven't converted my cache config to use it yet.
>
> I see a problem with the amount of recursion in the models classes.  I'm
> using the "contains" on ALL of my queries so that the queries run faster,
> but I think that when cake loads the models and all it's recursions, it
> takes forever since I have 88 tables that all relate to the user some how.
>
> Does anyone have suggestions?
>
> Alan

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Speed and performance

2010-06-10 Thread Alan Asher
I am dealing with a site that is probably larger than had originally been
thought of when the designers made CakePHP.  I have already invested 4
months in development and now that I have a user base it bogs down a lot
when about 5 users get on at the same time.  I'm hoping to have thousands of
users on at the same time.

 

I have set up cache to cache most of the layout since it doesn't change but
from day to day or every two minutes.  I'm using file cache and wonder if it
would help switching to APC.  I have an ubuntu server that I control
completely and have already taken the initial steps to install APC, but I
haven't converted my cache config to use it yet.

 

I see a problem with the amount of recursion in the models classes.  I'm
using the "contains" on ALL of my queries so that the queries run faster,
but I think that when cake loads the models and all it's recursions, it
takes forever since I have 88 tables that all relate to the user some how.

 

Does anyone have suggestions?

 

Alan

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


persistent connection and performance?

2010-06-09 Thread saidbakr
Hi,

My development server is built on XAMPP 1.7.3 which is running on
computer operated by WindowsXP SP3. The performance is, notably, low
of my cake applications. I use persistent false in database.php
configuration.

I don't know, exactly, what's the reason of low performance. Does it
due to XAMPP, CakePHP -1.6.2, my computer's configurations - AMD
Athlon XP 1800+, 1.25 GB RAM, 160 GB Hard Disk or anti virus software
such as Avast 5?!

What I mean by low performance is the waiting for something like
http://localhost/mycake/posts/

Any suggestions please?!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: increase performance with often used queries

2010-04-02 Thread Jon Bennett
Hi Alex,

Caching is very useful, check out Mile's sql cache code
http://www.milesj.me/blog/read/34/Cacheing-Each-Query-Individually

Cheers,

J

On 2 April 2010 14:12, alex bailey  wrote:
> Hi people :)
>
> I've been working on my cakephp project for some time now and now i
> start to realize that I must be able to do something with the
> performance. I've read alot of tutorials and I will for sure use them
> later on but now I have a different concern. Lets say for example I
> have a Car model a car has a user, speed, name etc.
> Every user who is logged in has a certain car like
>
>  User id 4 has car id 4
>  User id 5 has car id 5
>
> You get the idea.
>
> Now what my problem:
>
> I have to use this 1 car belonging to the user in many different
> controllers.
> The result is I use something like  $this->Car->findById(5); very
> often creating maybe 5-6 times the same query on 1 page!
>
> Is there a way to reduce this somehow? Like fetching the model data
> once and use it for all controllers or cache it somewhere for that 1
> user?
>
> I really appreciate any help.
>
> Regards
>
> Alex
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.
>



-- 
jon bennett - www.jben.net - blog.jben.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


increase performance with often used queries

2010-04-02 Thread alex bailey
Hi people :)

I've been working on my cakephp project for some time now and now i
start to realize that I must be able to do something with the
performance. I've read alot of tutorials and I will for sure use them
later on but now I have a different concern. Lets say for example I
have a Car model a car has a user, speed, name etc.
Every user who is logged in has a certain car like

 User id 4 has car id 4
 User id 5 has car id 5

You get the idea.

Now what my problem:

I have to use this 1 car belonging to the user in many different
controllers.
The result is I use something like  $this->Car->findById(5); very
often creating maybe 5-6 times the same query on 1 page!

Is there a way to reduce this somehow? Like fetching the model data
once and use it for all controllers or cache it somewhere for that 1
user?

I really appreciate any help.

Regards

Alex

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.


Re: Performance Tuning Issues : Recursion in Models

2010-04-02 Thread nurvzy
If you're running into memory errors because your model relations are
too deep, you might try Lazy Loader
http://github.com/mcurry/lazy_loader

CakePHP loads each model association along with that model's
association etc, so you can do some pretty slick model chaining
stuff.  Due to restrictions on PHP 4, you couldn't do this on a "per
need" basis.  The Lazy Loader plugin attempts to load models on a per
need basis only.  So User->AssociatedModel is only loaded if you
specifically ask for it.  /shrug it might be something to look at if
you can't solve the issue some other way.

I too have a heavy model related site and haven't noticed this
problem.   I don't do anything spectacular, my client purchased a
rather robust host and we use memcache plus your basic cache features
of CakePHP.

Hope that helps,
Nick

On Apr 2, 12:17 am, "Alan Asher"  wrote:
> I recently launched my site live and it bogs with only 10 users active..
> page load times are minimum 3 seconds and at capacity . upwards 20 seconds I
> think I know what the problem is.
>
> I installed xdebug and have played around with some cache (ACP) stuff.  I
> found that actually deleting my app/tmp/cache/models entries helped improve
> performance since there must have been some old stuff in there.  
>
> I think the models have too much recursion.  The entire application is user
> centric and every model has some reference back to the user, and the user
> has a reference back to it AND MORE.  So I got a new screen and I thnk it's
> xdebug's
>
> ( ! ) Fatal error: Maximum function nesting level of '100' reached,
> aborting! in C:\xampp\htdocs\cakephp\cake\libs\folder.php on line 239
>
> Call Stack
>
> #
>
> Time
>
> Memory
>
> Function
>
> Location
>
> 1
>
> 0.0015
>
> 87144
>
> {main}( )
>
> ..\index.php:0
>
> 2
>
> 0.2187
>
> 3539376
>
> Dispatcher->dispatch( )
>
> ..\index.php:88
>
> 3
>
> 0.2656
>
> 3939992
>
> Dispatcher->_invoke( )
>
> ..\dispatcher.php:194
>
> 4
>
> 0.2656
>
> 3941320
>
> Controller->constructClasses( )
>
> ..\dispatcher.php:207
>
> 5
>
> 0.5621
>
> 9422760
>
> Controller->loadModel( )
>
> ..\controller.php:455
>
> 6
>
> 0.5622
>
> 9424448
>
> ClassRegistry->init( )
>
> ..\controller.php:510
>
> 7
>
> 0.5636
>
> 9464000
>
> Model->__construct( )
>
> ..\class_registry.php:140
>
> 8
>
> 0.5847
>
> 9500824
>
> Model->__createLinks( )
>
> ..\model.php:447
>
> 9
>
> 0.6094
>
> 9540520
>
> Model->__constructLinkedModel( )
>
> ..\model.php:638
>
> 10
>
> 0.6094
>
> 9541176
>
> ClassRegistry->init( )
>
> ..\model.php:666
>
> 11
>
> 0.6094
>
> 9574296
>
> Model->__construct( )
>
> ..\class_registry.php:140
>
> 12
>
> 0.6250
>
> 9614480
>
> Model->__createLinks( )
>
> ..\model.php:447
>
> 13
>
> 0.6562
>
> 9701072
>
> Model->__constructLinkedModel( )
>
> ..\model.php:638
>
> 14
>
> 0.6562
>
> 9701728
>
> ClassRegistry->init( )
>
> ..\model.php:666
>
> 15
>
> 0.6562
>
> 9731032
>
> Model->__construct( )
>
> ..\class_registry.php:140
>
> 16
>
> 0.6719
>
> 9751248
>
> Model->__createLinks( )
>
> ..\model.php:447
>
> 17
>
> 0.6719
>
> 9753248
>
> Model->__constructLinkedModel( )
>
> ..\model.php:638
>
> 18
>
> 0.6719
>
> 9753904
>
> ClassRegistry->init( )
>
> ..\model.php:666
>
> 19
>
> 0.6875
>
> 9806448
>
> Model->__construct( )
>
> ..\class_registry.php:140
>
> 20
>
> 0.7031
>
> 9845288
>
> Model->__createLinks( )
>
> ..\model.php:447
>
> 21
>
> 0.7031
>
> 9847288
>
> Model->__constructLinkedModel( )
>
> ..\model.php:638
>
> 22
>
> 0.7031
>
> 9847944
>
> ClassRegistry->init( )
>
> ..\model.php:666
>
> 23
>
> 0.7031
>
> 10083720
>
> Model->__construct( )
>
> ..\class_registry.php:140
>
> 24
>
> 0.7344
>
> 10201992
>
> Model->__createLinks( )
>
> ..\model.php:447
>
> 25
>
> 0.8624
>
> 10372984
>
> Model->__constructLinkedModel( )
>
> ..\model.php:638
>
> 26
>
> 0.8624
>
> 10373640
>
> ClassRegistry->init( )
>
> ..\model.php:666
>
> 27
>
> 0.8641
>
> 10431704
>
> Model->__construct( )
>
> ..\class_registry.php:140
>

Re: Tips on performance monitoring / profiling

2010-03-19 Thread Alex Bovey
On Wed, Mar 17, 2010 at 7:43 PM, Jon Bennett  wrote:
>
> Indexes make a huge difference, as does using the right column types.
> Containable is great, but you still need to analyse what's being
> retrieved and adjust. As little as possible generally!
>
>> Whilst there is the core cache library which is great, do you use any
>> kind of component in front of this to abstract it?  Or is it a case of
>> manually checking whether the cached element exists in your controller
>> action and then if not fetching from the DB?
>
> I have a custom solution based around Mile J's
> http://www.milesj.me/blog/read/34/Cacheing-Each-Query-Individually.
> It's pretty easy to cache stuff though, it's knowing when to clear
> them out that's the tricky bit.

Cheers JB - great help as always!

-- 
Alex Bovey
Web Developer | Alex Bovey Consultancy Ltd
Registered in England & Wales no. 6471391 | VAT no. 934 8959 65
a...@bovey.co.uk | t 0844 567 8995 | m 07828 649386 | f 0870 288 9533
PHP | MySQL | AJAX | XHTML | CSS | Javascript | XML | W3C Accessibility

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Tips on performance monitoring / profiling

2010-03-19 Thread Alex Bovey
On Wed, Mar 17, 2010 at 6:09 PM, Christian Leskowsky
 wrote:
>
> You might want to give YSlow / Page Speed a try too. They often turn up an 
> area or 2 worth looking into.

Thanks Christian - good advice too.

--
Alex Bovey
Web Developer | Alex Bovey Consultancy Ltd
Registered in England & Wales no. 6471391 | VAT no. 934 8959 65
a...@bovey.co.uk | t 0844 567 8995 | m 07828 649386 | f 0870 288 9533
PHP | MySQL | AJAX | XHTML | CSS | Javascript | XML | W3C Accessibility

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Tips on performance monitoring / profiling

2010-03-17 Thread Jon Bennett
> Whilst there is the core cache library which is great, do you use any
> kind of component in front of this to abstract it?  Or is it a case of
> manually checking whether the cached element exists in your controller
> action and then if not fetching from the DB?

check out Andy Dawson's MiCache as well
http://www.assembla.com/code/mi/subversion/nodes/branches/mi_plugin/vendors/mi_cache.php

J

-- 
jon bennett - www.jben.net - blog.jben.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Tips on performance monitoring / profiling

2010-03-17 Thread Jon Bennett
hi Alex,

>> In terms of profiling - it sounds like its the DB that's being
>> sluggish, how many hits are you getting? on what spec server? if you
>> have access you could run
>> http://www.webdevelopmentstuff.com/123/optimizing-mysql-performance-tuning-script.html
>> to try and optimise your mysql server.
>
> Yeah I think I'm just too lazy when it comes to indexes.  Definitely
> using Containable, but should probably be making better use of
> caching.

Indexes make a huge difference, as does using the right column types.
Containable is great, but you still need to analyse what's being
retrieved and adjust. As little as possible generally!

> Whilst there is the core cache library which is great, do you use any
> kind of component in front of this to abstract it?  Or is it a case of
> manually checking whether the cached element exists in your controller
> action and then if not fetching from the DB?

I have a custom solution based around Mile J's
http://www.milesj.me/blog/read/34/Cacheing-Each-Query-Individually.
It's pretty easy to cache stuff though, it's knowing when to clear
them out that's the tricky bit.

Cheers,

J

-- 
jon bennett - www.jben.net - blog.jben.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Tips on performance monitoring / profiling

2010-03-17 Thread Christian Leskowsky
You might want to give YSlow / Page Speed a try too. They often turn up an
area or 2 worth looking into.

On Wed, Mar 17, 2010 at 2:04 PM, Alex Bovey  wrote:

> On Wed, Mar 17, 2010 at 5:23 PM, Jon Bennett  wrote:
> >> Has anyone got any tips on performance monitoring and profiling a cake
> app?
> >
> > In terms of profiling - it sounds like its the DB that's being
> > sluggish, how many hits are you getting? on what spec server? if you
> > have access you could run
> >
> http://www.webdevelopmentstuff.com/123/optimizing-mysql-performance-tuning-script.html
> > to try and optimise your mysql server.
>
> Always there with solid advice JB - ta!
>
> Yeah I think I'm just too lazy when it comes to indexes.  Definitely
> using Containable, but should probably be making better use of
> caching.
>
> Whilst there is the core cache library which is great, do you use any
> kind of component in front of this to abstract it?  Or is it a case of
> manually checking whether the cached element exists in your controller
> action and then if not fetching from the DB?
>
> --
> Alex Bovey
> Web Developer | Alex Bovey Consultancy Ltd
> Registered in England & Wales no. 6471391 | VAT no. 934 8959 65
> a...@bovey.co.uk | t 0844 567 8995 | m 07828 649386 | f 0870 288 9533
> PHP | MySQL | AJAX | XHTML | CSS | Javascript | XML | W3C Accessibility
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
-

"You can't reason people out of a position they didn't use reason to get
into."

Christian Leskowsky

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Re: Tips on performance monitoring / profiling

2010-03-17 Thread Alex Bovey
On Wed, Mar 17, 2010 at 5:23 PM, Jon Bennett  wrote:
>> Has anyone got any tips on performance monitoring and profiling a cake app?
>
> In terms of profiling - it sounds like its the DB that's being
> sluggish, how many hits are you getting? on what spec server? if you
> have access you could run
> http://www.webdevelopmentstuff.com/123/optimizing-mysql-performance-tuning-script.html
> to try and optimise your mysql server.

Always there with solid advice JB - ta!

Yeah I think I'm just too lazy when it comes to indexes.  Definitely
using Containable, but should probably be making better use of
caching.

Whilst there is the core cache library which is great, do you use any
kind of component in front of this to abstract it?  Or is it a case of
manually checking whether the cached element exists in your controller
action and then if not fetching from the DB?

-- 
Alex Bovey
Web Developer | Alex Bovey Consultancy Ltd
Registered in England & Wales no. 6471391 | VAT no. 934 8959 65
a...@bovey.co.uk | t 0844 567 8995 | m 07828 649386 | f 0870 288 9533
PHP | MySQL | AJAX | XHTML | CSS | Javascript | XML | W3C Accessibility

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Tips on performance monitoring / profiling

2010-03-17 Thread Jon Bennett
> Has anyone got any tips on performance monitoring and profiling a cake app?

In terms of profiling - it sounds like its the DB that's being
sluggish, how many hits are you getting? on what spec server? if you
have access you could run
http://www.webdevelopmentstuff.com/123/optimizing-mysql-performance-tuning-script.html
to try and optimise your mysql server.

You can use xdebug to profile the app, but I don't think that'll shed
any light on the database.

Cheers,

J

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Tips on performance monitoring / profiling

2010-03-17 Thread Jon Bennett
hi Alex,

> Has anyone got any tips on performance monitoring and profiling a cake app?
>
> I'm using containable and number of queries doesn't look too bad but
> it's all running pretty slowly at the moment.

Use containable, explicitly set the fields you need in every model,
tune your database
http://www.jeremy-burns.co.uk/2010/02/cakephp-basic-database-table-tuning-tips/
and CACHE CACHE CACHE CACHE CACHE!

J


-- 
jon bennett - www.jben.net - blog.jben.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Tips on performance monitoring / profiling

2010-03-17 Thread Alex Bovey
Hi all,

Has anyone got any tips on performance monitoring and profiling a cake app?

I'm using containable and number of queries doesn't look too bad but
it's all running pretty slowly at the moment.

Thanks,

Alex

-- 
Alex Bovey
Web Developer | Alex Bovey Consultancy Ltd
Registered in England & Wales no. 6471391 | VAT no. 934 8959 65
a...@bovey.co.uk | t 0844 567 8995 | m 07828 649386 | f 0870 288 9533
PHP | MySQL | AJAX | XHTML | CSS | Javascript | XML | W3C Accessibility

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Flame Post: Performance 1.2.6 vs 1.3.0-RC1 - Bad news.

2010-03-08 Thread mark_story
Just to chip in on the subject of benchmarking as well.  I'm not a
huge fan of apache ab.  I've run into issues with it in the past when
testing php based sites. Results like those indicating that a
framework can outperform a simple php script make me question its
truthfulness.  I find that siege gives more consistent and realistic
results.

Its great to see that people are concerned about the performance that
cake has.  Its something that I and others on the core team have spent
a fair amount of improving when working on 1.3.  I'm glad to see see
that others were able to reproduce the speed improvements I saw when,
I last ran benchmarks as well :)

-Mark

On Mar 8, 4:45 am, WebbedIT  wrote:
> > Gee! Now I am really confused... Ferrari 599 is 1.2.6 and Prius is
> > 1.3.0-RC1?
>
> Lol, not quite, I compared your test to testing the newest model of a
> Ferrari against the outgoing model but using the criteria that we
> would use to test the Toyota.  Made sense to me :)
>
> > Anyway, the whole idea of hello world benchmarks is to assess the
> > frameworks weight.
>
> But you cannot assess the weight of a framework if the test doesn't t
> stress the majority of that framework.
>
> > Even though you and I do not agree on this methodology, I do bet you
> > want too a lean framework capable to deliver as many requests/second
> > as possible.
>
> I would be very interested to look at similar benchmarking on a large
> app.  Hopefully I will be in a position to do this later in the year
> as I am currently developing a multi-subdomain sector dedicated portal
> which should get a lot of traffic in Cake 1.2.6 and once I have the
> money to hire a development team I will be asking them to port the
> site to 1.3 and compare the two.
>
> > Should you think there is a better way to assess this measure, please
> > tell me, I am glad to know of it.
>
> I don't know of a better way as I'm yet to develop or run a site where
> it's performance has been called into question.  I can tell you that a
> client of mine who moved from a large bespoke CMS I coded (before I
> started using Cake) to Drupal has had a nightmare ever since.
>
> But the two systems were never comparable and I very much doubt the
> client will pay me to replicate his existing site with Cake and
> compare the performance of the two (I'd bet a lot of money on Cake
> performing better) but even if I could do this how would I make the
> test a fair comparison?
>
> For now myself and all my clients are very happy with cake 1.2.x
> performance and from your test it seems 1.3 is better so hoorah!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Flame Post: Performance 1.2.6 vs 1.3.0-RC1 - Bad news.

2010-03-08 Thread WebbedIT
> Gee! Now I am really confused... Ferrari 599 is 1.2.6 and Prius is
> 1.3.0-RC1?

Lol, not quite, I compared your test to testing the newest model of a
Ferrari against the outgoing model but using the criteria that we
would use to test the Toyota.  Made sense to me :)

> Anyway, the whole idea of hello world benchmarks is to assess the
> frameworks weight.

But you cannot assess the weight of a framework if the test doesn't t
stress the majority of that framework.

> Even though you and I do not agree on this methodology, I do bet you
> want too a lean framework capable to deliver as many requests/second
> as possible.

I would be very interested to look at similar benchmarking on a large
app.  Hopefully I will be in a position to do this later in the year
as I am currently developing a multi-subdomain sector dedicated portal
which should get a lot of traffic in Cake 1.2.6 and once I have the
money to hire a development team I will be asking them to port the
site to 1.3 and compare the two.

> Should you think there is a better way to assess this measure, please
> tell me, I am glad to know of it.

I don't know of a better way as I'm yet to develop or run a site where
it's performance has been called into question.  I can tell you that a
client of mine who moved from a large bespoke CMS I coded (before I
started using Cake) to Drupal has had a nightmare ever since.

But the two systems were never comparable and I very much doubt the
client will pay me to replicate his existing site with Cake and
compare the performance of the two (I'd bet a lot of money on Cake
performing better) but even if I could do this how would I make the
test a fair comparison?

For now myself and all my clients are very happy with cake 1.2.x
performance and from your test it seems 1.3 is better so hoorah!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Flame Post: Performance 1.2.6 vs 1.3.0-RC1 - Bad news.

2010-03-08 Thread Walther
I think that the time to develop is much more important then the
requests per second performance. Simply because hardware is magnitudes
cheaper then development time.

On Mar 7, 5:20 pm, Dérico Filho  wrote:
> Gee! Now I am really confused... Ferrari 599 is 1.2.6 and Prius is
> 1.3.0-RC1?
>
> Anyway, the whole idea of hello world benchmarks is to assess the
> frameworks weight. That's all. I am not here trying to figure out if
> 1.2.6 is better or worse then 1.3.0-RC1.
>
> Even though you and I do not agree on this methodology, I do bet you
> want too a lean framework capable to deliver as many requests/second
> as possible.
>
> Should you think there is a better way to assess this measure, please
> tell me, I am glad to know of it.
>
> On Mar 6, 4:27 am, WebbedIT  wrote:
>
> > @Derico
>
> > > I think you're missing the point here. I am not trying to assess the
> > > supposed advantage in using CakePHP.
>
> > > I am trying to assess its weight. Whatever the application you
> > > develop, when you choose using a framework you MUST understand how it
> > > is going to affect the overall performance.
>
> > No, I still believe it is you who is missing the point here.
>
> > You don't road test a Ferrari 599 and a Toyota Prius against the same
> > set of criteria. Whilst they are both cars and can ferry a person from
> > A to B, that's where the similarities end as they are totally
> > different machines designed to achieve different things.
>
> > What you are doing is comparable to testing an updated version of the
> > Ferrari 599 against the outgoing model using the criteria set for the
> > Toyota Prius.  It's just wrong!
>
> > To put a framework through it's paces you have to test the framework
> > itself, all your testing is the frameworks ability to extract it's
> > config options and read a few .htaccess rules ... how does that
> > provide any significant results?
>
> > However, I do agree with your assessment of Robert!
>
> > @Walther:
>
> > > and to throw a spanner into the works a simple php file with only echo
> > >'Hello world' in gets 3604 requests per second
>
> > >I therefor conclude that CakePHP is faster then no framework at
> > >all
>
> > ROFL, excellent conclusion  .. does that not prove benchmarking "hello
> > world" is pointless?!?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Flame Post: Performance 1.2.6 vs 1.3.0-RC1 - Bad news.

2010-03-07 Thread Dérico Filho
Gee! Now I am really confused... Ferrari 599 is 1.2.6 and Prius is
1.3.0-RC1?

Anyway, the whole idea of hello world benchmarks is to assess the
frameworks weight. That's all. I am not here trying to figure out if
1.2.6 is better or worse then 1.3.0-RC1.

Even though you and I do not agree on this methodology, I do bet you
want too a lean framework capable to deliver as many requests/second
as possible.

Should you think there is a better way to assess this measure, please
tell me, I am glad to know of it.


On Mar 6, 4:27 am, WebbedIT  wrote:
> @Derico
>
> > I think you're missing the point here. I am not trying to assess the
> > supposed advantage in using CakePHP.
>
> > I am trying to assess its weight. Whatever the application you
> > develop, when you choose using a framework you MUST understand how it
> > is going to affect the overall performance.
>
> No, I still believe it is you who is missing the point here.
>
> You don't road test a Ferrari 599 and a Toyota Prius against the same
> set of criteria. Whilst they are both cars and can ferry a person from
> A to B, that's where the similarities end as they are totally
> different machines designed to achieve different things.
>
> What you are doing is comparable to testing an updated version of the
> Ferrari 599 against the outgoing model using the criteria set for the
> Toyota Prius.  It's just wrong!
>
> To put a framework through it's paces you have to test the framework
> itself, all your testing is the frameworks ability to extract it's
> config options and read a few .htaccess rules ... how does that
> provide any significant results?
>
> However, I do agree with your assessment of Robert!
>
> @Walther:
>
> > and to throw a spanner into the works a simple php file with only echo
> >'Hello world' in gets 3604 requests per second
>
> >I therefor conclude that CakePHP is faster then no framework at
> >all
>
> ROFL, excellent conclusion  .. does that not prove benchmarking "hello
> world" is pointless?!?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Flame Post: Performance 1.2.6 vs 1.3.0-RC1 - Bad news.

2010-03-07 Thread Dérico Filho
@Walther: I think I did a mistake indeed. There is a missing slash by
the end of 1.2.6 url address (http://serverbenchmark/cakephp-1.2.6 vs
http://serverbenchmark/cakephp-1.2.6/).

1.3.0-RC1 out performed the 1.2.6.

Thanks for the help

On Mar 6, 2:25 am, Walther  wrote:
> @Dérico: I believe that your server is configured incorrectly. I can't
> seem to replicate the same results, in my case CakePHP 1.3 outperforms
> 1.2.6 (I am using Apache 2.2 which may be the difference). Also make
> sure that you have debugging off before you benchmark anything.
>
> These are the best results out of 20 runs with each:
>
> CakePHP 1.3:
> cakephp$ ab -n 1000 -c 100 http:///cakephp
> This is ApacheBench, Version 2.3 <$Revision: 655654 $>
> Copyright 1996 Adam Twiss, Zeus Technology Ltd,http://www.zeustech.net/
> Licensed to The Apache Software Foundation,http://www.apache.org/
>
> Benchmarking 192.168.1.10 (be patient)
> Completed 100 requests
> Completed 200 requests
> Completed 300 requests
> Completed 400 requests
> Completed 500 requests
> Completed 600 requests
> Completed 700 requests
> Completed 800 requests
> Completed 900 requests
> Completed 1000 requests
> Finished 1000 requests
>
> Server Software:        Apache/2.2.12
> Server Hostname:        192.168.1.10
> Server Port:            80
>
> Document Path:          /cakephp
> Document Length:        314 bytes
>
> Concurrency Level:      100
> Time taken for tests:   0.168 seconds
> Complete requests:      1000
> Failed requests:        0
> Write errors:           0
> Non-2xx responses:      1000
> Total transferred:      565000 bytes
> HTML transferred:       314000 bytes
> Requests per second:    5959.76 [#/sec] (mean)
> Time per request:       16.779 [ms] (mean)
> Time per request:       0.168 [ms] (mean, across all concurrent
> requests)
> Transfer rate:          3288.34 [Kbytes/sec] received
>
> Connection Times (ms)
>               min  mean[+/-sd] median   max
> Connect:        0    0   1.1      0       4
> Processing:     2   16   2.9     16      34
> Waiting:        2   16   2.8     16      29
> Total:          6   16   2.0     17      34
>
> Percentage of the requests served within a certain time (ms)
>   50%     17
>   66%     17
>   75%     17
>   80%     17
>   90%     17
>   95%     17
>   98%     18
>   99%     18
>  100%     34 (longest request)
>
> CakePHP 1.2.6:
> cakephp$ ab -n 1000 -c 100 http:///cakephp
> This is ApacheBench, Version 2.3 <$Revision: 655654 $>
> Copyright 1996 Adam Twiss, Zeus Technology Ltd,http://www.zeustech.net/
> Licensed to The Apache Software Foundation,http://www.apache.org/
>
> Benchmarking 192.168.1.10 (be patient)
> Completed 100 requests
> Completed 200 requests
> Completed 300 requests
> Completed 400 requests
> Completed 500 requests
> Completed 600 requests
> Completed 700 requests
> Completed 800 requests
> Completed 900 requests
> Completed 1000 requests
> Finished 1000 requests
>
> Server Software:        Apache/2.2.12
> Server Hostname:        192.168.1.10
> Server Port:            80
>
> Document Path:          /cakephp
> Document Length:        314 bytes
>
> Concurrency Level:      100
> Time taken for tests:   0.190 seconds
> Complete requests:      1000
> Failed requests:        0
> Write errors:           0
> Non-2xx responses:      1000
> Total transferred:      565000 bytes
> HTML transferred:       314000 bytes
> Requests per second:    5259.45 [#/sec] (mean)
> Time per request:       19.013 [ms] (mean)
> Time per request:       0.190 [ms] (mean, across all concurrent
> requests)
> Transfer rate:          2901.94 [Kbytes/sec] received
>
> Connection Times (ms)
>               min  mean[+/-sd] median   max
> Connect:        0    2   6.7      0      24
> Processing:     2   16   2.7     17      31
> Waiting:        2   16   2.7     17      31
> Total:         13   18   4.6     17      37
>
> Percentage of the requests served within a certain time (ms)
>   50%     17
>   66%     17
>   75%     17
>   80%     17
>   90%     18
>   95%     31
>   98%     35
>   99%     36
>  100%     37 (longest request)
>
> To summarise:
> 1.3 gets 5959.7 requests per second
> 1.2.6 gets 5259.45 requests per second
> and to throw a spanner into the works a simple php file with only echo
> 'Hello world' in gets 3604 requests per second
>
> I therefor conclude that CakePHP is faster then no framework at
> all
>
> On Mar 5, 10:05 pm, Dérico Filho  wrote:
>
>
>
> > @WebbedIT
>
> > I think you're missing the point here. I am not trying to assess the
> > supposed

Re: Flame Post: Performance 1.2.6 vs 1.3.0-RC1 - Bad news.

2010-03-05 Thread WebbedIT
@Derico
> I think you're missing the point here. I am not trying to assess the
> supposed advantage in using CakePHP.
>
> I am trying to assess its weight. Whatever the application you
> develop, when you choose using a framework you MUST understand how it
> is going to affect the overall performance.

No, I still believe it is you who is missing the point here.

You don't road test a Ferrari 599 and a Toyota Prius against the same
set of criteria. Whilst they are both cars and can ferry a person from
A to B, that's where the similarities end as they are totally
different machines designed to achieve different things.

What you are doing is comparable to testing an updated version of the
Ferrari 599 against the outgoing model using the criteria set for the
Toyota Prius.  It's just wrong!

To put a framework through it's paces you have to test the framework
itself, all your testing is the frameworks ability to extract it's
config options and read a few .htaccess rules ... how does that
provide any significant results?

However, I do agree with your assessment of Robert!

@Walther:
> and to throw a spanner into the works a simple php file with only echo
>'Hello world' in gets 3604 requests per second
>
>I therefor conclude that CakePHP is faster then no framework at
>all

ROFL, excellent conclusion  .. does that not prove benchmarking "hello
world" is pointless?!?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Flame Post: Performance 1.2.6 vs 1.3.0-RC1 - Bad news.

2010-03-05 Thread Walther
@Dérico: I believe that your server is configured incorrectly. I can't
seem to replicate the same results, in my case CakePHP 1.3 outperforms
1.2.6 (I am using Apache 2.2 which may be the difference). Also make
sure that you have debugging off before you benchmark anything.

These are the best results out of 20 runs with each:

CakePHP 1.3:
cakephp$ ab -n 1000 -c 100 http:///cakephp
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.10 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:Apache/2.2.12
Server Hostname:192.168.1.10
Server Port:80

Document Path:  /cakephp
Document Length:314 bytes

Concurrency Level:  100
Time taken for tests:   0.168 seconds
Complete requests:  1000
Failed requests:0
Write errors:   0
Non-2xx responses:  1000
Total transferred:  565000 bytes
HTML transferred:   314000 bytes
Requests per second:5959.76 [#/sec] (mean)
Time per request:   16.779 [ms] (mean)
Time per request:   0.168 [ms] (mean, across all concurrent
requests)
Transfer rate:  3288.34 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:00   1.1  0   4
Processing: 2   16   2.9 16  34
Waiting:2   16   2.8 16  29
Total:  6   16   2.0 17  34

Percentage of the requests served within a certain time (ms)
  50% 17
  66% 17
  75% 17
  80% 17
  90% 17
  95% 17
  98% 18
  99% 18
 100% 34 (longest request)

CakePHP 1.2.6:
cakephp$ ab -n 1000 -c 100 http:///cakephp
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.10 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:Apache/2.2.12
Server Hostname:192.168.1.10
Server Port:80

Document Path:  /cakephp
Document Length:314 bytes

Concurrency Level:  100
Time taken for tests:   0.190 seconds
Complete requests:  1000
Failed requests:0
Write errors:   0
Non-2xx responses:  1000
Total transferred:  565000 bytes
HTML transferred:   314000 bytes
Requests per second:5259.45 [#/sec] (mean)
Time per request:   19.013 [ms] (mean)
Time per request:   0.190 [ms] (mean, across all concurrent
requests)
Transfer rate:  2901.94 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:02   6.7  0  24
Processing: 2   16   2.7 17  31
Waiting:2   16   2.7 17  31
Total: 13   18   4.6 17  37

Percentage of the requests served within a certain time (ms)
  50% 17
  66% 17
  75% 17
  80% 17
  90% 18
  95% 31
  98% 35
  99% 36
 100% 37 (longest request)


To summarise:
1.3 gets 5959.7 requests per second
1.2.6 gets 5259.45 requests per second
and to throw a spanner into the works a simple php file with only echo
'Hello world' in gets 3604 requests per second

I therefor conclude that CakePHP is faster then no framework at
all

On Mar 5, 10:05 pm, Dérico Filho  wrote:
> @WebbedIT
>
> I think you're missing the point here. I am not trying to assess the
> supposed advantage in using CakePHP.
>
> I am trying to assess its weight. Whatever the application you
> develop, when you choose using a framework you MUST understand how it
> is going to affect the overall performance.
>
> The whole idea behind "hello world" benchmarks is to provide the
> leanness of a framework. The leaner the better.
>
> You see, we, as CakePHP users, must defend it against creeping
> featuritis... I do enjoy these powerful tools CakePHP offer...
> However, I DO NEED a lean framework.
>
> The tradeoff "more features mean less performance" should be frown
> upon and avoided wherever is possible.
>
> @RobertP
>
> Although I understand your choice, I deem to be one of the worst
> attitudes towards CakePHP community. I mean, if you know a patch
> created a performance problem, and you DO know how to solve it better
> or more elegantly... plea

Re: Flame Post: Performance 1.2.6 vs 1.3.0-RC1 - Bad news.

2010-03-05 Thread Dérico Filho
@WebbedIT

I think you're missing the point here. I am not trying to assess the
supposed advantage in using CakePHP.

I am trying to assess its weight. Whatever the application you
develop, when you choose using a framework you MUST understand how it
is going to affect the overall performance.

The whole idea behind "hello world" benchmarks is to provide the
leanness of a framework. The leaner the better.

You see, we, as CakePHP users, must defend it against creeping
featuritis... I do enjoy these powerful tools CakePHP offer...
However, I DO NEED a lean framework.

The tradeoff "more features mean less performance" should be frown
upon and avoided wherever is possible.

@RobertP

Although I understand your choice, I deem to be one of the worst
attitudes towards CakePHP community. I mean, if you know a patch
created a performance problem, and you DO know how to solve it better
or more elegantly... please, patch it and have it sent to the
development team. I am sure they will check out and listen to you.

I did it with SSN validation check, and my patched was accepted.




On Mar 5, 6:34 am, WebbedIT  wrote:
> @Derico
> Whilst it would be interesting to hear from the developers as to why
> there is such as big difference between those numbers I must state
> that we've been here many times before and benchmarking an
> installation of CakePHP to echo "Hello World" is not a true benchmark
> of the frameworks abilities.
>
> Who in their right mind would install such a framework to echo "Hello
> World"?  They would sensibly code a single HTML/PHP page which would
> beat the crap out of any framework's benchmark as they are not
> intended to facilitate such menial tasks.
>
> You need to test the performance of an application to get a true
> picture of how the versions compare against one another as I doubt
> there have been any modifications to code to improve the performance
> of running a single PHP echo command.
>
> What happens to those requests per second when you start using
> behaviours, components, plugins etc?
>
> @Robert P
>
> > I'm currently enjoying a sensible framework.
>
> Which framework are you using instead and what is your criteria set
> which deems CakePHP to not be a sensible framework?
>
> I personally am sticking with 1.2.x until 1.3 has been stable for some
> time whilst others have been running production sites on 1.3 for some
> time and I have not seen many threads questioning its performance.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Flame Post: Performance 1.2.6 vs 1.3.0-RC1 - Bad news.

2010-03-05 Thread Miles J
It honestly doesn't matter in the end once caching, memcached and APC
are running.

The same applies to any framework, you just go with whatevers
comfortable for you.

On Mar 5, 1:41 am, nurvzy  wrote:
> I've been using 1.3 for production site with zero issues thus far.
>
> On Mar 5, 2:34 am, WebbedIT  wrote:
>
> > @Derico
> > Whilst it would be interesting to hear from the developers as to why
> > there is such as big difference between those numbers I must state
> > that we've been here many times before and benchmarking an
> > installation of CakePHP to echo "Hello World" is not a true benchmark
> > of the frameworks abilities.
>
> > Who in their right mind would install such a framework to echo "Hello
> > World"?  They would sensibly code a single HTML/PHP page which would
> > beat the crap out of any framework's benchmark as they are not
> > intended to facilitate such menial tasks.
>
> > You need to test the performance of an application to get a true
> > picture of how the versions compare against one another as I doubt
> > there have been any modifications to code to improve the performance
> > of running a single PHP echo command.
>
> > What happens to those requests per second when you start using
> > behaviours, components, plugins etc?
>
> > @Robert P
>
> > > I'm currently enjoying a sensible framework.
>
> > Which framework are you using instead and what is your criteria set
> > which deems CakePHP to not be a sensible framework?
>
> > I personally am sticking with 1.2.x until 1.3 has been stable for some
> > time whilst others have been running production sites on 1.3 for some
> > time and I have not seen many threads questioning its performance.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Flame Post: Performance 1.2.6 vs 1.3.0-RC1 - Bad news.

2010-03-05 Thread nurvzy
I've been using 1.3 for production site with zero issues thus far.

On Mar 5, 2:34 am, WebbedIT  wrote:
> @Derico
> Whilst it would be interesting to hear from the developers as to why
> there is such as big difference between those numbers I must state
> that we've been here many times before and benchmarking an
> installation of CakePHP to echo "Hello World" is not a true benchmark
> of the frameworks abilities.
>
> Who in their right mind would install such a framework to echo "Hello
> World"?  They would sensibly code a single HTML/PHP page which would
> beat the crap out of any framework's benchmark as they are not
> intended to facilitate such menial tasks.
>
> You need to test the performance of an application to get a true
> picture of how the versions compare against one another as I doubt
> there have been any modifications to code to improve the performance
> of running a single PHP echo command.
>
> What happens to those requests per second when you start using
> behaviours, components, plugins etc?
>
> @Robert P
>
> > I'm currently enjoying a sensible framework.
>
> Which framework are you using instead and what is your criteria set
> which deems CakePHP to not be a sensible framework?
>
> I personally am sticking with 1.2.x until 1.3 has been stable for some
> time whilst others have been running production sites on 1.3 for some
> time and I have not seen many threads questioning its performance.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Flame Post: Performance 1.2.6 vs 1.3.0-RC1 - Bad news.

2010-03-05 Thread WebbedIT
@Derico
Whilst it would be interesting to hear from the developers as to why
there is such as big difference between those numbers I must state
that we've been here many times before and benchmarking an
installation of CakePHP to echo "Hello World" is not a true benchmark
of the frameworks abilities.

Who in their right mind would install such a framework to echo "Hello
World"?  They would sensibly code a single HTML/PHP page which would
beat the crap out of any framework's benchmark as they are not
intended to facilitate such menial tasks.

You need to test the performance of an application to get a true
picture of how the versions compare against one another as I doubt
there have been any modifications to code to improve the performance
of running a single PHP echo command.

What happens to those requests per second when you start using
behaviours, components, plugins etc?

@Robert P
> I'm currently enjoying a sensible framework.

Which framework are you using instead and what is your criteria set
which deems CakePHP to not be a sensible framework?

I personally am sticking with 1.2.x until 1.3 has been stable for some
time whilst others have been running production sites on 1.3 for some
time and I have not seen many threads questioning its performance.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Flame Post: Performance 1.2.6 vs 1.3.0-RC1 - Bad news.

2010-03-05 Thread Robert P
This doesn't necessarily surprise me.

There was one particular bugfix several months ago which involved
adding a singleton call then looping over and regex matching each item
in the returned array. And there was an alternative fix that just
delimited a string properly with virtually zero overhead. I read over
the fix that had been committed and decided not to use Cake for
professional applications any more.

I'm currently enjoying a sensible framework.

--
Varisan International 

On Mar 5, 7:37 am, Dérico Filho  wrote:
> Hello,
>
> I am not a professional benchmarker, but I decided to make some
> comparison between 1.2.6 and 1.3.0-RC1 tags. So, I downloaded them,
> and created the following file:
>
> cat app/views/pages/home.ctp
> hello world.
>
> And changed nothing else. Just created the file, I ran Apache's AB
> several times, I tried to pick the best numbers among all tests done
> on my server and I obtained these numbers:
>
> # /usr/local/apache/bin/ab -A"**:***" -n 1000 -c 
> 100http://serverbenchmark/cakephp-1.2.6
> This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $>
> apache-2.0
> Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd,http://www.zeustech.net/
> Copyright (c) 2006 The Apache Software Foundation,http://www.apache.org/
>
> Benchmarking serverbenchmark (be patient)
> Completed 100 requests
> Completed 200 requests
> Completed 300 requests
> Completed 400 requests
> Completed 500 requests
> Completed 600 requests
> Completed 700 requests
> Completed 800 requests
> Completed 900 requests
> Finished 1000 requests
>
> Server Software:        Apache/2.0.63
> Server Hostname:        serverbenchmark
> Server Port:            80
>
> Document Path:          /cakephp-1.2.6
> Document Length:        359 bytes
>
> Concurrency Level:      100
> Time taken for tests:   7.615287 seconds
> Complete requests:      1000
> Failed requests:        0
> Write errors:           0
> Non-2xx responses:      1000
> Total transferred:      629000 bytes
> HTML transferred:       359000 bytes
> Requests per second:    131.31 [#/sec] (mean)
> Time per request:       761.529 [ms] (mean)
> Time per request:       7.615 [ms] (mean, across all concurrent
> requests)
> Transfer rate:          80.63 [Kbytes/sec] received
>
> Connection Times (ms)
>               min  mean[+/-sd] median   max
> Connect:        0    0   2.0      0      17
> Processing:     3  695 819.2    101    3245
> Waiting:        1  695 819.3    100    3244
> Total:          7  696 819.6    101    3248
>
> Percentage of the requests served within a certain time (ms)
>   50%    101
>   66%   1013
>   75%   1029
>   80%   1044
>   90%   2052
>   95%   2244
>   98%   3234
>   99%   3241
>  100%   3248 (longest request)
>
> # /usr/local/apache/bin/ab -A"**:***" -n 1000 -c 
> 100http://serverbenchmark/cakephp-1.3.0-RC1/
> This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $>
> apache-2.0
> Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd,http://www.zeustech.net/
> Copyright (c) 2006 The Apache Software Foundation,http://www.apache.org/
>
> Benchmarking serverbenchmark (be patient)
> Completed 100 requests
> Completed 200 requests
> Completed 300 requests
> Completed 400 requests
> Completed 500 requests
> Completed 600 requests
> Completed 700 requests
> Completed 800 requests
> Completed 900 requests
> Finished 1000 requests
>
> Server Software:        Apache/2.0.63
> Server Hostname:        serverbenchmark
> Server Port:            80
>
> Document Path:          /cakephp-1.3.0-RC1/
> Document Length:         bytes
>
> Concurrency Level:      100
> Time taken for tests:   14.150790 seconds
> Complete requests:      1000
> Failed requests:        101
>    (Connect: 0, Length: 101, Exceptions: 0)
> Write errors:           0
> Total transferred:      1505381 bytes
> HTML transferred:       1116446 bytes
> Requests per second:    70.67 [#/sec] (mean)
> Time per request:       1415.079 [ms] (mean)
> Time per request:       14.151 [ms] (mean, across all concurrent
> requests)
> Transfer rate:          103.88 [Kbytes/sec] received
>
> Connection Times (ms)
>               min  mean[+/-sd] median   max
> Connect:        0    7  21.2      0      73
> Processing:    95 1361 517.6   1275    3105
> Waiting:       82 1324 533.1   1232    3105
> Total:        122 1368 516.4   1276    3105
>
> Percentage of the requests served within a certain time (ms)
>   50%   1276
>   66%   1354
>   75%   1396
>   80%   1466
>   90%   2224
>   95%   2475
>   98%   3063
>   99%   3073
>  100%   3105 (longest request)
>
> Well the 1.2.6 tag out performs the 1.3.0-RC1 on the main number
> (IMHO): requests per second.
>
> Flame Question: Shouldn't 1.3.0-RC1 release perform better than 1.2.6?
>
> Should anyone point any flaw in this benchmark, pleas tell me, so I
> can run the tests correctly.
>
> Dérico Filho

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related que

Flame Post: Performance 1.2.6 vs 1.3.0-RC1 - Bad news.

2010-03-04 Thread Dérico Filho
Hello,


I am not a professional benchmarker, but I decided to make some
comparison between 1.2.6 and 1.3.0-RC1 tags. So, I downloaded them,
and created the following file:


cat app/views/pages/home.ctp
hello world.


And changed nothing else. Just created the file, I ran Apache's AB
several times, I tried to pick the best numbers among all tests done
on my server and I obtained these numbers:

# /usr/local/apache/bin/ab -A"**:***" -n 1000 -c 100
http://serverbenchmark/cakephp-1.2.6
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $>
apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking serverbenchmark (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests


Server Software:Apache/2.0.63
Server Hostname:serverbenchmark
Server Port:80

Document Path:  /cakephp-1.2.6
Document Length:359 bytes

Concurrency Level:  100
Time taken for tests:   7.615287 seconds
Complete requests:  1000
Failed requests:0
Write errors:   0
Non-2xx responses:  1000
Total transferred:  629000 bytes
HTML transferred:   359000 bytes
Requests per second:131.31 [#/sec] (mean)
Time per request:   761.529 [ms] (mean)
Time per request:   7.615 [ms] (mean, across all concurrent
requests)
Transfer rate:  80.63 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:00   2.0  0  17
Processing: 3  695 819.21013245
Waiting:1  695 819.31003244
Total:  7  696 819.61013248

Percentage of the requests served within a certain time (ms)
  50%101
  66%   1013
  75%   1029
  80%   1044
  90%   2052
  95%   2244
  98%   3234
  99%   3241
 100%   3248 (longest request)



# /usr/local/apache/bin/ab -A"**:***" -n 1000 -c 100
http://serverbenchmark/cakephp-1.3.0-RC1/
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $>
apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking serverbenchmark (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests


Server Software:Apache/2.0.63
Server Hostname:serverbenchmark
Server Port:80

Document Path:  /cakephp-1.3.0-RC1/
Document Length: bytes

Concurrency Level:  100
Time taken for tests:   14.150790 seconds
Complete requests:  1000
Failed requests:101
   (Connect: 0, Length: 101, Exceptions: 0)
Write errors:   0
Total transferred:  1505381 bytes
HTML transferred:   1116446 bytes
Requests per second:70.67 [#/sec] (mean)
Time per request:   1415.079 [ms] (mean)
Time per request:   14.151 [ms] (mean, across all concurrent
requests)
Transfer rate:  103.88 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:07  21.2  0  73
Processing:95 1361 517.6   12753105
Waiting:   82 1324 533.1   12323105
Total:122 1368 516.4   12763105

Percentage of the requests served within a certain time (ms)
  50%   1276
  66%   1354
  75%   1396
  80%   1466
  90%   2224
  95%   2475
  98%   3063
  99%   3073
 100%   3105 (longest request)


Well the 1.2.6 tag out performs the 1.3.0-RC1 on the main number
(IMHO): requests per second.

Flame Question: Shouldn't 1.3.0-RC1 release perform better than 1.2.6?


Should anyone point any flaw in this benchmark, pleas tell me, so I
can run the tests correctly.


Dérico Filho

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Question of Performance read () or findById

2010-02-27 Thread WebRenovator
I guess its just habit or personal preference. I tend to use read,
just to make sure that joins are never returned (though i also tend to
set recursive=-1 in my app_model so that problem never actually
happens). I use find for more complex queries.

On Feb 26, 11:16 am, WebbedIT  wrote:
> I always use find, not for any particular reason other than I am then
> using a consistent command across my site with a consistent way to
> pass in my variables to control the results I get.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Question of Performance read () or findById

2010-02-26 Thread WebbedIT
I always use find, not for any particular reason other than I am then
using a consistent command across my site with a consistent way to
pass in my variables to control the results I get.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Question of Performance read () or findById

2010-02-25 Thread amarradi
In which case do you prefer read and in which case do you use find?

On 25 Feb., 21:00, amarradi  wrote:
> Thanks,
>
> i think i try find and read. After that i compare the performance. If
> everyone had some more informations, please post it here
>
> Marcus
>
> On 25 Feb., 19:13, "Dr. Loboto"  wrote:
>
> > They both ends with regular find. You can just check source.
>
> > On Feb 25, 9:02 pm, amarradi  wrote:
>
> > > Hello,
>
> > > i have an question to the performance of an statement. Which is better
> > > in the view of the performance.
> > > The first way i use was this.
>
> > >  $entry = $this->WishlistEntry->read(null, $this->data['WishlistEntry']
> > > ['wishlist_entry_id']);
> > > in the next step of my programming evolution i found findById.
>
> > >  $entry = $this->MyModel->findById($this->data['MyModel']
> > > ['entry_id']);
>
> > > What are the difference between this tow lines of code. Which is
> > > better for the performance
>
> > > many greetings
> > > marcus radisch

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Question of Performance read () or findById

2010-02-25 Thread amarradi
In which case do you prefer read and in which case do you use find?

On 25 Feb., 21:00, amarradi  wrote:
> Thanks,
>
> i think i try find and read. After that i compare the performance. If
> everyone had some more informations, please post it here
>
> Marcus
>
> On 25 Feb., 19:13, "Dr. Loboto"  wrote:
>
> > They both ends with regular find. You can just check source.
>
> > On Feb 25, 9:02 pm, amarradi  wrote:
>
> > > Hello,
>
> > > i have an question to the performance of an statement. Which is better
> > > in the view of the performance.
> > > The first way i use was this.
>
> > >  $entry = $this->WishlistEntry->read(null, $this->data['WishlistEntry']
> > > ['wishlist_entry_id']);
> > > in the next step of my programming evolution i found findById.
>
> > >  $entry = $this->MyModel->findById($this->data['MyModel']
> > > ['entry_id']);
>
> > > What are the difference between this tow lines of code. Which is
> > > better for the performance
>
> > > many greetings
> > > marcus radisch

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Question of Performance read () or findById

2010-02-25 Thread amarradi
Thanks,

i think i try find and read. After that i compare the performance. If
everyone had some more informations, please post it here

Marcus

On 25 Feb., 19:13, "Dr. Loboto"  wrote:
> They both ends with regular find. You can just check source.
>
> On Feb 25, 9:02 pm, amarradi  wrote:
>
> > Hello,
>
> > i have an question to the performance of an statement. Which is better
> > in the view of the performance.
> > The first way i use was this.
>
> >  $entry = $this->WishlistEntry->read(null, $this->data['WishlistEntry']
> > ['wishlist_entry_id']);
> > in the next step of my programming evolution i found findById.
>
> >  $entry = $this->MyModel->findById($this->data['MyModel']
> > ['entry_id']);
>
> > What are the difference between this tow lines of code. Which is
> > better for the performance
>
> > many greetings
> > marcus radisch

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Question of Performance read () or findById

2010-02-25 Thread Dr. Loboto
They both ends with regular find. You can just check source.

On Feb 25, 9:02 pm, amarradi  wrote:
> Hello,
>
> i have an question to the performance of an statement. Which is better
> in the view of the performance.
> The first way i use was this.
>
>  $entry = $this->WishlistEntry->read(null, $this->data['WishlistEntry']
> ['wishlist_entry_id']);
> in the next step of my programming evolution i found findById.
>
>  $entry = $this->MyModel->findById($this->data['MyModel']
> ['entry_id']);
>
> What are the difference between this tow lines of code. Which is
> better for the performance
>
> many greetings
> marcus radisch

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


  1   2   3   4   >