Live data from Hacker News

Refactored PHP engine makes Wordpress 20% faster

news.php.net

41–50 of 147 posts

Re: Refactored PHP engine makes Wordpress 20% faster

#41
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!

Not sure what this has to do with the topic at hand, but since you derailed the conversation let me tell you that I run several WordPress sites with a few dozen million visits a month without much trouble.

Re: Refactored PHP engine makes Wordpress 20% faster

#42
post #33

> Wordpress 3.6 – 20.0% gain (253 vs 211 req/sec) How do you generate 211 pages per second on Wordpress to begin with? My server does page generation for my own custom-built blog in ~15ms, but takes a whopping three seconds for a single Wordpress page. I know it's somewhat offtopic and it's about the relative results, but what hardware is this?

Are you running an opcache like Zend Opcache, APC, XCache etc? 3 seconds is amazingly slow.

I meant raw page generation times. With caching it was much quicker of course. I assume the PHP benchmarks are also non-cached, else you're just benchmarking the caching method.

Re: Refactored PHP engine makes Wordpress 20% faster

#43
post #15
post #14

Earlier quoted context omitted.

Give it a year or two. Seriously! 5.5 was just released a little while ago and 5.6 is just in beta now.

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

Irrelevant how? I doubt BlueHost, HostGator, Dreamhost, etc, and on and on will have implemented HHVM as their core PHP offering by then. Most web hosts still have PHP 5.3 installed, and even the PHP 5.4 I've used on Media Temple's servers is out of date.

But at the rate PHP's release cycle has accelerated (remember that 5.3 dates from 2009...) it's entirely likely that the trend will continue. And more hosts are offering up-to-date PHP versions as an option.

I still see a future for Zend PHP.

Re: Refactored PHP engine makes Wordpress 20% faster

#44
post #32

Earlier quoted context omitted.

Depends on the WP plugins, I suppose (and Indexes created, and MySQL tuning, etc)

And themes. It's not unusual to see themes that cause 100+ database queries. Per pageview.

Lots of these themes include 3 menus. And Wordpress menus are notoriously query heavy. That's why a lot of sites have caching—not because the page is large, but because the menus take so long to load.

Re: Refactored PHP engine makes Wordpress 20% faster

#45
post #42

Earlier quoted context omitted.

Are you running an opcache like Zend Opcache, APC, XCache etc? 3 seconds is amazingly slow.

I meant raw page generation times. With caching it was much quicker of course. I assume the PHP benchmarks are also non-cached, else you're just benchmarking the caching method.

Yea, opcache "caches" the compiled PHP code. So the first "page generation" might take ages, because PHP has to load all the .php files and compile them. But an opcache will _keep_ the compiled versions around, so the next time you need to execute the .php files, it can skip the (very expensive) step of compiling them again.

This makes PHP much, much faster. The only time the files are recompiled are if you restart your webserver, or if you modify the .php files.

I'm not talking about static html generation, that's another thing all together.

Re: Refactored PHP engine makes Wordpress 20% faster

#46
post #36
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.

> We still do new projects in PHP and we couldn't be happier. I concur, especially when frameworks like Symfony exist. Reading all this smack talk about PHP on HN is so alien considering how thriving the PHP community actually is.

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.

Re: Refactored PHP engine makes Wordpress 20% faster

#47
post #33

> Wordpress 3.6 – 20.0% gain (253 vs 211 req/sec) How do you generate 211 pages per second on Wordpress to begin with? My server does page generation for my own custom-built blog in ~15ms, but takes a whopping three seconds for a single Wordpress page. I know it's somewhat offtopic and it's about the relative results, but what hardware is this?

Could just be your hosting. For example, with Media Temple (years ago) I found it often took 7+ seconds just to redirect www to non-www, up to 12 seconds. Pingdom is a good tool to see where you're getting stuck http://tools.pingdom.com/fpt/ Another common problem, your MySQL database could be overloaded (especially with shared hosting) and more caching won't necessarily solve the problem.

Re: Refactored PHP engine makes Wordpress 20% faster

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

Re: Refactored PHP engine makes Wordpress 20% faster

#49
post #36

Earlier quoted context omitted.

> We still do new projects in PHP and we couldn't be happier. I concur, especially when frameworks like Symfony exist. Reading all this smack talk about PHP on HN is so alien considering how thriving the PHP community actually is.

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.

[deleted]

Re: Refactored PHP engine makes Wordpress 20% faster

#50
post #33

> Wordpress 3.6 – 20.0% gain (253 vs 211 req/sec) How do you generate 211 pages per second on Wordpress to begin with? My server does page generation for my own custom-built blog in ~15ms, but takes a whopping three seconds for a single Wordpress page. I know it's somewhat offtopic and it's about the relative results, but what hardware is this?

My Linode VPS spits out WordPress pages in 33.811ms (via ApacheBench, concurrency=10 for a couple hundred requests). I don't use any kind of content/page cache. There's no reason WordPress would be 200 times slower than your custom blog -- WordPress isn't some kind of complex software. It's a handful of very small PHP classes that choose a theme file based on the URL, include it, run a database query to select some posts, wrap the result rows in objects, and pass them to the theme to spit out. I've had hundreds of concurrent visitors on my blog without registering any load. If your site is taking 3 seconds to return a page, there's something wrong and it's not the choice of blog platform.
Post reply on HN