Live data from Hacker News

Refactored PHP engine makes Wordpress 20% faster

news.php.net

71–80 of 147 posts

Re: Refactored PHP engine makes Wordpress 20% faster

#71
post #61
post #15

Earlier quoted context omitted.

Just try to imagine HHVM in year or two. Zend PHP will be irrelevant by then.

I'm not sure why you guys ganged up to downvote on something obvious - PHP is loosing grounds to HHVM already. I'm considering it for all my PHP projects already - it's easy to install and most PHP frameworks are well-supported already ( http://hhvm.com/frameworks/ ). I can imagine HHVM having integration within Nginx a la HttpLuaModule, which uses LuaJIT and would eliminate going the FastCGI route.

>I'm not sure why you guys ganged up to downvote on something obvious - PHP is loosing grounds to HHVM already.

Perhaps because some on HN are computer scientists, so to convince them it takes actual numbers and not some anecdotal evidence of what you personally use.

Judging from all available data sources, you are an outlier.

HHVM doesn't have that large a community (mostly FB people), is not installed in the overwhelming majority of hosts, still has compatibility issues, has few posts about it, there are very few mentions of companies using it, and, for what it is, has been largerly ignored in the whole PHP community (forums, etc).

Re: Refactored PHP engine makes Wordpress 20% faster

#72
post #7

I love how, through all the hate and bandwagoning, some people don't get discouraged and actually do something to improve the product. We still do new projects in PHP and we couldn't be happier.

Dmitry is the man who originally wrote eaccelerator, Zend caught wind of him and hired him! Then he worked on opcache and has done some amazing things in getting the Zend Engine and PHP itself flying. He's a very smart cookie.

His good sense is obvious by the way he stopped going down the JIT route and zeroed in on the bigger performance drain, memory allocation, instead. The smart programmer knows how to write a JIT; the wise programmer knows how to not write a JIT.

Re: Refactored PHP engine makes Wordpress 20% faster

#73
post #48
post #7

I love how, through all the hate and bandwagoning, some people don't get discouraged and actually do something to improve the product. We still do new projects in PHP and we couldn't be happier.

About a year ago I was ready to jump ship on PHP. Then someone introduced me to Composer, Symfony 2 and Doctrine 2. I fell in love with PHP again, not because of the language but because of the tools. Its now clear to me that the language doesn't really matter that much, it's the tooling around the language that makes the difference.

Agreed. One thing to consider is how the features and performance of a language shape the tools. The tools can be great, but to some degree you're riding a long distance skateboard with a generator on the back...

Edit: This comment comes off as me making fun of PHP, when I simply meant to say that tools can make something effective but what underlies an effective work environment can still be crap. I don't think PHP is "crap," but at a certain level of complexity its easier to get the "average developer" to be effective using another set of tools.

Re: Refactored PHP engine makes Wordpress 20% faster

#74
post #59
post #53

Earlier quoted context omitted.

I meant a clean wordpress install. No themes, no plugins, just a basic install. Three seconds. My own blog does about 3 mysql queries and manages that in 8ms at best (usually 22ms at worst; typical seems to be around 15ms). The most limiting factor for Wordpress was cpu speed.

Maybe try increasing the PHP memory limit? I don't think Wordpress is causing the slowness you are seeing.

Yeah, WordPress can get slow pretty quick, but a naked install should be pretty snappy. The codebase itself is pretty small (~50kLOC) but the DB queries can get ugly depending on the plugins installed. Naked WP on GoDaddy or similary crap shared hosting site can be slow, but certainly not on a VPS.

Re: Refactored PHP engine makes Wordpress 20% faster

#75
post #40
post #21

Refactoring Wordpress will make it even faster. Look at the difference between Drupal and Wordpress. It's amazing Wordpress is still used for big sites while a ton of recourses could be saved. But great work on the PHP engine!

I don't think it's fair to say that Drupal is faster than Wordpress by just looking at the req/sec. According to https://wiki.php.net/phpng , they benchmarked against Wordpress 3.6 (the current version is 3.9). I couldn't find anything about the Drupal benchmark, but it could be a simple "Hello world" for all we know.

Drupal is pretty slow if you disable the default caching, and sometimes even with the caching (depends on modules loaded) - part of the problem is Drupal's table bloat. I swear a naked install has 100+ tables (and with a few plugins and a few fields enabled, has 250+ tables - so you end up with tens and hundreds of queries per page load).

Re: Refactored PHP engine makes Wordpress 20% faster

#76
post #60

Earlier quoted context omitted.

Nobody mentions how much or little the PHP community thrives. People point out how bad PHP compares against other languages. The fact that you enjoy using PHP and that you can create great products with it does not imply that it has no flaws. Many have been where you are now, and then moved on to other languages to never ever look back. From what I've seen, the reverse is much less common.

> Nobody mentions how much or little the PHP community thrives. People point out how bad PHP compares against other languages. I don't actually think that faults in a language matter that much if the people using it are competent. Both Javascript and Perl come close to PHP in terms of negative traits, yet a lot of good software was written with both. The same can be said about PHP, the only difference is that people…

JavaScript is a horrible language. The fact that a lot of good software is written in JavaScript because there is no good alternative in the browser does not make it any less a horrible language.

The problem with PHP is that it is a horrible language and there are plenty of better options in its niche. Those two factors combine to make PHP a nonstarter for programmers who are familiar with the other options.

I dispute that there is any good software written in Perl.

Re: Refactored PHP engine makes Wordpress 20% faster

#77
post #71
post #61

Earlier quoted context omitted.

I'm not sure why you guys ganged up to downvote on something obvious - PHP is loosing grounds to HHVM already. I'm considering it for all my PHP projects already - it's easy to install and most PHP frameworks are well-supported already ( http://hhvm.com/frameworks/ ). I can imagine HHVM having integration within Nginx a la HttpLuaModule, which uses LuaJIT and would eliminate going the FastCGI route.

> I'm not sure why you guys ganged up to downvote on something obvious - PHP is loosing grounds to HHVM already. Perhaps because some on HN are computer scientists, so to convince them it takes actual numbers and not some anecdotal evidence of what you personally use. Judging from all available data sources, you are an outlier. HHVM doesn't have that large a community (mostly FB people), is not installed in the overw…

I have nearly 30 years of professional experience and my intuition is pretty reliable. If HHVM wasn't what runs the largest PHP app in the world, things would have been much different. Hack brings many language people that Zend for one reason or another didn't not deliver all these years.

Re: Refactored PHP engine makes Wordpress 20% faster

#78
post #69
post #58

Earlier quoted context omitted.

In 2 years, HHVM will perform so much faster than PHP 6 and Hack will offer so many added benefits that even the shared hosting guys will switch to it as it will make them serve more sites with the same hardware plus developers will push to have Hack in place anyway.

That's not how it normally works with those kinds of re-implementations. Heck, Python 3 hasn't even replaced Python 2 -- and people will dump PHP for Hack? A language which doesn't even have a community at the moment, it's 99% Facebook people.

Python 3 is a different story! As you mention below outliers, let's not use them, please! GNU/Linux OS does not depend on PHP like it depends on Python.

Re: Refactored PHP engine makes Wordpress 20% faster

#79
post #69
post #58

Earlier quoted context omitted.

In 2 years, HHVM will perform so much faster than PHP 6 and Hack will offer so many added benefits that even the shared hosting guys will switch to it as it will make them serve more sites with the same hardware plus developers will push to have Hack in place anyway.

That's not how it normally works with those kinds of re-implementations. Heck, Python 3 hasn't even replaced Python 2 -- and people will dump PHP for Hack? A language which doesn't even have a community at the moment, it's 99% Facebook people.

Also, if we have to use Python as an example, then PyPy was a better analogy than Python 3.

Re: Refactored PHP engine makes Wordpress 20% faster

#80
post #63
post #51

Earlier quoted context omitted.

What's so good about Symfony compared to other PHP frameworks?

It's a mature, well designed and cleanly written piece of software that is very modular. It also has a great documentation and knowledgeable community around it. Other PHP frameworks lack some or most of these features: some are either very opinionated and rigid (Yii, Cake) huge and sparsely documented (Zend 2) or just old and approaching abandonment (Codeigniter, Kohana).

I'm just starting to learn PHP, and I noticed that recently there have a few new books about Laravel. So, it seems to be the "new hot thing" in PHP.

To a newbie, would you recommend Symfony, or Laravel?

Thanks!

Post reply on HN