The Truth About The Yii 1.1.x Performance

Yii is a high-performance PHP framework … false !

What yii say :

What the truth :

more info :

Hm. Noticed the version numbers?

The benchmark use yii 1.1.8

Also, those two benchmarks test different operations.

Yes. And the benchmark from the Yii site uses 1.0.2. All other frameworks differ quite heavily n version numbers as well. Also what nineinchnick said.

Have you ran into any actual performance issue with Yii?

If so, have you tried to discuss it on the forum or file an issue on Github?

Benchmarks and diagrams are great for killing time, but as the author of the linked post says:

Just for the record: Benchmarks do serve a purpose. It’s just dubious what some (read: most) people tend to read into them :rolleyes:

I think such posts must be deleted at once.

That’s different benchmark, also different versions. I think you should try with APC as well.

Why? I think they need to be properly discussed.

Most people cannot read the documentation, do you think they will read forum discussion? :)

So they find first post and go like “oh noes, yii is bad, let’s try something else!”.

Since synthetic tests make not much sense, all these FW comparisons are often the way to promote external resources.

Cannot or will not? ;)

Anyway, you are indeed right that for most, the impression of the first post will stick. But deleting them is an overreaction IMHO.

"will not" I suppose, my English is not good sry.

I’d like to second that. Trollers or trollingly-phrased posts will forever come along the way. No need to get too excited about them.

One other thing - I always like to keep my mind open. I never benchmarked different frameworks and do prefer (carefully and critically) reading others information about it, as teasing as it might be phrased. Maybe they are right?

Its complicated to ‘objectively’ compare frameworks by running a benchmark since its very hard to organize such a comparison. You always compare some specific aspect of the framework (DB involved in the test or not?). The typical benchmark test tests small part of the FW therefore its results are always biased in favor of the FW that handles that use case the best. More true-to-life benchmark tests are simply complex and possibly cumbersome to read and analyze and who has time to dive into complex texts these days?..

[size=2]IMHO, "benchmarks" graduated from the same class that "statistics" did. This nice phrase about statistics is in place [/size]

Choosing a framework only because a benchmark shows you it’s the fastest one out there is plain stupid if you ask me. Benchmarks will always be subjective to a level so you should start by not trusting any.

For me, and i guess for most sane developers, it matters the way the framework has been designed, how easy is to extend and work with, and most of all, how comfortable you are using it.

If i want top notch performance i would stick with procedural code but again, do i really want this when there are great tools like Yii available ?

I know from my own experience that Yii is not that fast by default, but again, any good developer with good experience will be able to make it very fast.

What i came to learn during Yii usage is that most of the time people will blame the framework when they should blame themselves(i.e: not experienced developers jumping in a ship where clearly you have to have good knowledges).

Also, even if Yii is the fastest framework in this world, and say SluggishFramework(not enough inspiration) would be the slowest, there will be always developers that will make a SluggishFramework project run faster than a Yii project, mainly because they are better developers and they know how to use the tool they have.

The idea is that the framework is just the smallest part that matters when you design and code an application.

Ah, one other minor fact, there are plenty of frameworks there, if you don’t like Yii, why stick around?

Just my two cents :)

Hello World Benchmark by Phalcon

The benchmark above looks fair to me.

Phalcon is super fast, because of its usage of PHP C-extension.

Compared to it, other raw PHP frameworks are very slow, even with APC enabled (the benchmarks were performed with APC enabled).

Although, I believe that all major raw PHP frameworks nowadays are equally fast enough for 90% of the web sites. Symfony and Zend are relatively slow, but there are many people out there who will choose them for a large project. We have to admit that they are not too slow and have many other merits. And, as you might know very well, some people don’t want to go back to CodeIgniter even if it is a little faster than their favorite. In short, speed is not a major concern when we choose one among them. I would stick to Yii for its good balance and ease of use.

But, again, speed is something that fascinates all of us. How much would I be happy if I could repeat the phrase that once were an undeniable fact: "Yii is the fastest PHP framework" !?

Personally I’d like to know how much acceleration we will get when we use facebook’s HHVM with those raw PHP frameworks. Maybe some of them would be faster than Phalcon? I don’t know.

I like that Phalcon benchmark, it even uses quite recent versions of frameworks.

Phalcon is fast because its a little library plus written in C?

It is not complex, not even half of features of Symfony or Yii. Lookat their I18N class.

The graph showing requests per second in the Phalcon benchmark is wrong and shortchanges Yii by showing 851.83 req/s while the Apachebench screencapture clearly shows Yii actually did 961.28 req/s. See this side-by-side if you don’t want to scroll.

So Yii with 961.28 req/s is actually in third place ahead of Kohana (which made 860.59 req/s).

Please someone Github-savvy submit the correction to the docs:

In terms of fair performance tests I like this one. Yii was the fastest among the known frameworks (second in the test to Pixie, the test author’s own framework) in a test were each framework has its own application to measure both database access and routing speed.