Performance comparision CakePHP and symfony
We can see some benchmark. But that's only "hello world" or something simple codes.
I compared CakePHP and symfony in real application. that's well known symfony sample "askeet!!".
I compared CakePHP and symfony in real application. that's well known symfony sample "askeet!!".
comparision target
- "askeet!!" is a sample application for symfony1.0
- the frontpage ported to CakePHP and share the database
- the data was registered in symfony application.
test environment
- AMD Opteron1210(1800x2)
- memory 4GB
- FreeBSD7.0-STABLE
- apache 2.2.9
- PHP 5.2.6
- MySQL 5.0.67
result
- CakePHP1.1
- 3.27 request per second.
- CakePHP1.2final
- 2.26 request per second.
- symfony
- 2.11 request per second.
- CakePHP1.2RC2
- 1.92 request per second.
more detail and codes
Comments
Comment
1 some thoughts
- Did you test with debug set to 2?
- You really should not load models in the App Controller
- Seems like some unnecessary custom SQL in your Models
- No caching
- Some queries are not optimized
- Using Containable or Linkable might speed things up for you, and reducing recursion levels as well where applicable.
Comment
2 some answers
first debug level set to 0 on testing.
I thoughts cake was quite fast, so I didn't tune as fast as possible.
and the query cost are only couple of mile seconds.
this experiment has done as similar symfony styles, so these codes are not best style for cake.
my biggest question is the difference between Cake1.1 and 1.2.
the aplication codes are almost same, but the results are different.
Comment
3 title - valid not empty
I hope someday new cake releases will be faster then previous.
If not, after few releases more, cake will have 0.02 req/s,
but we shall claim victory! because symphony had 0.01 !
:)
Comment
4 Where is the problem?
1. You say: "Framework cost x10 by HTML. More 40% - 150% than Wiki"
Is ok, a framework is suppose to do more than you can do with pure html or wiki.
Ofcourse, if you use it only to do what single html or wiki can do, you have a performance issue.
2. How can you explain that if cake 1.2 has 300% more steps by xDebug than symfony, the difference of performance is only 10% without APC and almost 50% with APC?
Comment
5 :---)
There are some faster frameworks than cake.
But cake is quite fast, and I believe cake will be faster more !
Comment
6 my answer.
If we use some caching and optimizing codes, we get more better result.
But in this case, I don't use any output cacheing.
Because I didn't see output caching in the askeet, And I would know the result of usual codes.
I have the result of xDebug and I can publish these too.
I'm not sure about this deference, I guess the 1 step is not even each function calls.
And APC is more effective for symfony, because it has so many huge files.
Comment
7 framework benchmark competition
It would be nice that someone start a multi-framework benchmark project.
We should define a set of basic/complex operation that a framework should do with different datatype and relations.
After that, ask the creators of each framework to provide the best implementation for that cases.
Would be nice and very useful to see a competition in this area.
Comment
8 the cause is..?
Would be nice to locate the cause of performance issue, even only for the test case that you presented (askeet).
10% (no APC) is not much but 50% (with APC) it is.
Comment
9 try Jobeet!