Yii Framework Forum: symfony 2.0 performance tests - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

symfony 2.0 performance tests Rate Topic: -----

#1 User is offline   yiimann 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 102
  • Joined: 19-December 09

Posted 23 February 2010 - 03:07 PM

I went through performance tests on the symfony 2.0 official website.
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.
0

#2 User is offline   Y!! 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 978
  • Joined: 18-June 09

Posted 23 February 2010 - 03:37 PM

I've read the Symfony 2 page some days ago and I think it's pretty impressive. Ah nice thing is that they use namespaces for example. Also the coding standards applied in the source is exactly how I write code - I was happily surprised. :lol: Though, it's a long way to go since first release is set for end of 2010.

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.
0

#3 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,900
  • Joined: 04-October 08
  • Location:DC, USA

Posted 23 February 2010 - 03:59 PM

Yii 1.1.1 is not out yet. I guess they used the trunk code.

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.
0

#4 User is offline   yiimann 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 102
  • Joined: 19-December 09

Posted 23 February 2010 - 05:55 PM

I totally agree.
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.
0

#5 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,778
  • Joined: 17-January 09
  • Location:Russia

Posted 23 February 2010 - 07:01 PM

qiang, maybe it will be good to contact Fabien and make some corrections regarding it? Just not to confuse developers.

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.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#6 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,900
  • Joined: 04-October 08
  • Location:DC, USA

Posted 23 February 2010 - 07:50 PM

I guess class method reflection is used to determine the parameter names. I am not sure if this is really good or not. It adds some hidden association between the method parameter names and the input parameters. If you modify the method parameter name by mistake, it will break the code.
0

#7 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,778
  • Joined: 17-January 09
  • Location:Russia

Posted 24 February 2010 - 04:39 AM

It's not really hidden. Parameter names are specified in routes almost the same way as in Yii's $_GET parameters. And, I think it's the same regarding mistakes: typo in $_GET['name'] leads to the same problem.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#8 User is offline   jonah 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 733
  • Joined: 27-November 08
  • Location:California (US)

Posted 24 February 2010 - 07:54 PM

CakePHP did something similar with parameter names.. I don't really miss it though..

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
http://php-thoughts.cubedwater.com - my bloggings about Yii
0

#9 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,016
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 25 February 2010 - 03:26 AM

View Postjonah, on 24 February 2010 - 07:54 PM, said:

Look how much typing was required for their simple route:
http://github.com/sy...fig/routing.yml


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).
0

#10 User is offline   ekerazha 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 526
  • Joined: 10-October 08
  • Location:European Union

Posted 25 February 2010 - 04:30 AM

View Postqiang, on 23 February 2010 - 03:59 PM, said:

Yii 1.1.1 is not out yet. I guess they used the trunk code.

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.
Yii user #37
0

#11 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,778
  • Joined: 17-January 09
  • Location:Russia

Posted 25 February 2010 - 05:23 AM

jonah
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.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#12 User is offline   Luciano 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 139
  • Joined: 20-September 09
  • Location:Buenos Aires, Argentina

Posted 25 February 2010 - 06:25 AM

I hope we don't become like YII fanboys...
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...
Company web site: pressEnter

Free as in "beer"...
0

#13 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,778
  • Joined: 17-January 09
  • Location:Russia

Posted 25 February 2010 - 06:30 AM

Luciano
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.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#14 User is offline   ekerazha 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 526
  • Joined: 10-October 08
  • Location:European Union

Posted 25 February 2010 - 08:06 AM

View Postsamdark, on 25 February 2010 - 05:23 AM, said:

ekerazha
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.
Yii user #37
0

#15 User is offline   jayrulez 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 348
  • Joined: 29-July 09

Posted 25 February 2010 - 07:30 PM

http://paul-m-jones.com/?p=1222
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.
1

#16 User is offline   Neil 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 15-February 10

Posted 17 March 2010 - 06:04 AM

You know other than in a really broad sense these benchmarks aren't worth very much, take a look at http://blog.astrumfu...ly-Useless.html , the guy there shows how with four reasonably simple steps he gets Zend (whihc if you believe most benchmarks is slowish) to beat Symfony 2 in the benchmark.
1

#17 User is offline   synthetic 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 15-December 08
  • Location:Francavilla-al-Mare, Italy

Posted 17 March 2010 - 09:39 AM

Indeed - I'm sure I could produce a 'test' that would make any other framework appear faster (or slower) than Yii.


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 :) - not so for most other frameworks ...

(Oh, and yes, YAML sucks ...)
0

#18 User is offline   Zeph 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 43
  • Joined: 28-February 10

Posted 30 March 2010 - 09:47 PM

View Postsamdark, on 25 February 2010 - 06:30 AM, said:

We're just discussing good parts of Symfony 2 and trying to imagine if they will fit Yii.


Hear, hear.
0

#19 User is offline   mech7 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 220
  • Joined: 26-March 09

Posted 31 March 2010 - 10:50 AM

Hmm i do like Symfony but like most im here because I hated the config files hehe ::) Speed is not everything...

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
0

#20 User is offline   zekus 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 09-March 10
  • Location:London

Posted 29 April 2010 - 05:40 AM

All this competition is absolutely fabulous ... I expect great things when Yii will be refactored to take advantage of all the new PHP 5.3 enhancements (like Fabien Potencier did with Symfony 2)!
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users