symfony 2.0 performance tests
#1
Posted 23 February 2010 - 03:07 PM
According to them symfony 2.0 is 75% faster than yii 1.1.1
First, is Yii 1.1.1 out... ?
Second, how is that even possible ?
here is the link to those tests : http://symfony-reloaded.org/fast
Sounds like a revenge to me.
#2
Posted 23 February 2010 - 03:37 PM
Note that it says "50% faster than Yii 1.1.1 - for production mode" (that's what counts). They tested the trunk version, where it says in the changelog "1.1.1 - to be released". Other than that I wonder why you guys always freak out when you see frameworks claiming to be faster than Yii? In this case I guess Smyfony just has a slim core with less "magic" involved. Also possible that they gain some speed from the usage of php namespaces, don't know.
#3
Posted 23 February 2010 - 03:59 PM
The comparison is a bit unfair for yii in two aspects:
1. the data caching is not enabled for yii, which results in parsing the URL rules for every request. Symfony, on the hand, caches their url rules by default. And solar doesn't support two-way URL management.
2. nested layout is used for yii (column1->main) in their second comparison, while other frameworks only use one-level layout.
My guess is that with the above two aspects fixed, the gap won't be as big as shown in their results.
I am not sure if the benchmark makes a lot of sense because it seems to me it focuses too much on the routing part (10 URL rules are used). A typical yii application should use less than 5 rules if most of its URLs are regular.
At this moment, improving the performance is not the top priority for yii because we haven't heard any user complaining about yii's performance. We will continue focusing more on the ease of use, features and documentation in the near future. When time comes for us to develop yii 2.0 (on PHP 5.3), we will revisit this.
#4
Posted 23 February 2010 - 05:55 PM
I am more than happy with yii performances and I am also glad to say that we have chosen Yii for our next french large scale project in my company.
#5
Posted 23 February 2010 - 07:01 PM
If we've started to discuss Symfony 2, I'd like to add my two cents and maybe to discuss it a bit.
I really like how routing is made. Parameters are bound by name and are passed to controller actions via named method parameters. Still don't know how it's done, but it looks very clean. If I remember correctly, Django does it the same way.
File structure, logger, class autoloading, bundles (except that Yii core is not divided too much) are very similar (conceptually) to what is in Yii.
#6
Posted 23 February 2010 - 07:50 PM
#7
Posted 24 February 2010 - 04:39 AM
#8
Posted 24 February 2010 - 07:54 PM
PHP 5.3 really isn't supported by very many shared hosts yet unfortunately. At least not the ones I tried..
Looks similar to yii:
http://github.com/sy...oController.php
I think having the action method named indexAction is worse than actionIndex.. don't know why they do that.
Look how much typing was required for their simple route:
http://github.com/sy...fig/routing.yml
seems they got a few good ideas going tho
#9
Posted 25 February 2010 - 03:26 AM
jonah, on 24 February 2010 - 07:54 PM, said:
Slightly OT:
Your last link reminded me, why i ran far far away from Symfony some years ago: YML. I hated having to learn another syntax to create dynamic PHP code (at least that's how i understood). Why not use PHP for that in the first place? That's a big plus for Yii: I like that everything's pure PHP (except maybe js for the client, but that's a different story).
#10
Posted 25 February 2010 - 04:30 AM
qiang, on 23 February 2010 - 03:59 PM, said:
The comparison is a bit unfair for yii in two aspects:
1. the data caching is not enabled for yii, which results in parsing the URL rules for every request. Symfony, on the hand, caches their url rules by default. And solar doesn't support two-way URL management.
2. nested layout is used for yii (column1->main) in their second comparison, while other frameworks only use one-level layout.
Moreover, the fact Yii is the fastest after their own framework, is pretty good.
#11
Posted 25 February 2010 - 05:23 AM
Well, I don't miss named parameters very much as well. It's just another code style and it looks a bit cleaner.
Same about indexAction vs actionIndex. It's just another style.
PHP 5.3 is not a big problem nowadays. There are many virtual private server hosting services and they are cheap.
ekerazha
According to Symfony 2 tests (that are not really fair), Yii is not faster.
Mike
I can agree about yaml. Too easy to make a typo.
In Symfony 2 they do have a good alternative to yaml — XML. There is validation and code completion.
As for PHP configs… well they are too much complicated in Symfony 2.
#12
Posted 25 February 2010 - 06:25 AM
Well, even if Symfony would run 100 times faster than YII, I wouldn't use it again (after using it for two years).
I think it's overcomplicated. And yes...I think YML and config files sucks too...
And btw, we don't need to blame other frameworks...
Developers are free to choose what they want, and for us, YII is our choice (at least until we choose other framework that fits better to our needs)...
YII doesn't need evangelists. Let's show the world what YII can do developing sites with it...
Development using free software.
#13
Posted 25 February 2010 - 06:30 AM
Noone blames Symfony 2. Fabien did a really good job compared to Symfony 1 and there are some innovations too. We're just discussing good parts of Symfony 2 and trying to imagine if they will fit Yii.
#14
Posted 25 February 2010 - 08:06 AM
samdark, on 25 February 2010 - 05:23 AM, said:
According to Symfony 2 tests (that are not really fair), Yii is not faster.
I've said it's the fastest after Symfony 2, not that it's faster than Symfony 2.
#15
Posted 25 February 2010 - 07:30 PM
php:
foreach(array('cat', 'dog', 'cow') as $animal) echo $animal."\n";
python:
[(animal, print(animal)) for animal in ['cat', 'dog', 'cow']]
ruby:
['cat', 'dog', 'cow'].each {|animal| puts animal}
You say Tomato, I say Tomato.
#16
Posted 17 March 2010 - 06:04 AM
#17
Posted 17 March 2010 - 09:39 AM
IMHO, the real questions are :
1. Can I produce the application I need without re-inventing the wheel & without a mountain of redundant code sitting around the place.
2. Can I do this *quickly*.
3. Does my real-world application run fast enough to satisfy my prospective user group without upgrading my server hardware.
4. Is the community for the framework I have chosen populated by smart people who are happy to help others (i.e. me).
Obviously, for Yii the answer to all 4 questions is a resounding YES
(Oh, and yes, YAML sucks ...)
#19
Posted 31 March 2010 - 10:50 AM
Very cool though that all frameworks have adopted 5.3 now.. ZF, Lithium, Symfony..
Lithium looks pretty cool now am eager to give it a test drive when i have some time
#20
Posted 29 April 2010 - 05:40 AM

Help

















