Live data from Hacker News

Refactored PHP engine makes Wordpress 20% faster

news.php.net

131–140 of 147 posts

Re: Refactored PHP engine makes Wordpress 20% faster

#131
post #110

Earlier quoted context omitted.

No, not anymore. All you guys comment negatively and cowardly silently downvote and I'm sure most of you haven't even bothered to look into HHVM.

I've looked into it. a) it's run developed by a company whose policy is "move fast and break things". I have seen the result of this mantra first hand in their fucking terrible Facebook "api" where something breaks every time anyone anywhere in the world farts. b) the number and nature of incompatibilities are too vast. c) their intention is pretty clear with "hack" - they want a php-like language but not php. That's…

The mantra is changing (as of this f8). There's nothing wrong with evolving PHP or any language. Being stalled for so long gave other languages a chance to steal from its pie, but there are signs (like with phpng) that things are changing. Java was stubborn enough not to evolve for so long, but even they learned already. Everybody is doing rapid release cycles now and that's not a bad thing. Things that don't evolve die - at least this is the perception. And developers today have a different mindset compared to 10-20 years ago.

Re: Refactored PHP engine makes Wordpress 20% faster

#132
post #40

Earlier quoted context omitted.

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

You seem to be mistakenly thinking that more tables by definition always == more queries. That isn't the case. A bunch of those tables rarely get queried.

I really don't understand people's aversion to database tables. I have a join, the world is ending! Pay attention to your indexes and 9 times out of 10 everything will be fine. For that 1 other time, there's Varnish.

Re: Refactored PHP engine makes Wordpress 20% faster

#133
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?

Judging from your other responses, it sounds like you are running it on something like this: http://www.ebay.com/itm/like/181342056669?lpid=82

You really can't judge it based on that hardware. Of course it runs slower then your "custom" blog... it is probably orders of magnitude more complex.

Also you haven't mentioned what platform you are using. I don't know if those netbooks run linux or windows, but if you are trying to host this on a desktop version of windows with something like Xampp it is really incomparable as well.

Re: Refactored PHP engine makes Wordpress 20% faster

#134
post #110

Earlier quoted context omitted.

No, not anymore. All you guys comment negatively and cowardly silently downvote and I'm sure most of you haven't even bothered to look into HHVM.

I've looked into it. a) it's run developed by a company whose policy is "move fast and break things". I have seen the result of this mantra first hand in their fucking terrible Facebook "api" where something breaks every time anyone anywhere in the world farts. b) the number and nature of incompatibilities are too vast. c) their intention is pretty clear with "hack" - they want a php-like language but not php. That's…

Just have to chime in here. As someone who works with the Facebook API on a nearly daily basis, it has come a LONG way in the past year or so. When I first started with it 3-4 years ago it was an absolute nightmare. It is actually quite consistent now and they are doing a much better job of documenting / addressing bugs.

Re: Refactored PHP engine makes Wordpress 20% faster

#135
post #63

Earlier quoted context omitted.

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 really like Yii. In my opinion it is exceptionally well designed and offers so much functionality. The Yii programmers designed it with performance in mind. I can understand that you find it opinionated, but in my opinions the pros outweigh the cons.

I liked Yii too, until I had to switch to Laravel for a new client. While Laravel is missing a few features baked in, like generators and admin tools, 95% of Laravel is way better designed and documented than Yii.

The only worthwhile point I still see in favor of Yii is its ORM can generate fewer, albeit more complicated, queries when eagerly loading nested objects. (OTOH, I encountered some ugly pagination bugs last summer when doing that...)

Re: Refactored PHP engine makes Wordpress 20% faster

#136

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.

If you enjoy programming in it, and you can create great code then what's the problem?

because real world people don't program because it's fun, they program because they need to make money.

Re: Refactored PHP engine makes Wordpress 20% faster

#137

Love the work, but honestly by the time PHP 5.7 is ready for mainstream (with extension support mysqli, memcache, mongo), Facebook HHVM will be the defacto standard. FB has a huge head start and can throw nearly unlimited money and engineering hours at the problem. Seems like a losing battle, but perhaps I am wrong.

PHP's success is the result of PHP being available at even the tiniest webhost. I don't see that happen for FaceBook HHVM, though. FaceBook HHVM performance results will spur on Zend's efforts in making the PHP engine faster, though.

> PHP's success is the result of PHP being available at even the tiniest webhost.

I don't think so. PHP was the most performant (when paired with MySQL) and the simplest environment/language to develop with, for the time (late 90s onward). Projects grew and money was made off of functional sites that scaled to the critical mass. It was common to hire highly skilled developers for optimizing parts of a site that had been originally done in PHP. If PHP only interacted with Oracle or had been relatively slow as an Apache module, it would never have been popularized. Period. Java, C, Perl, LISP, etc were simply left behind with convoluted setups and ridiculously difficult syntax for the simplest of tasks (java was particularly immature). Later, webhosts appeared and PHP was trivial to integrate (as it had always been). In the late 90's the cheapest webhost was about $5 a month (thread.net - with a waiting list)

By 2000, Yahoo had done a proper assessment and moved over straightforward development to PHP (still using oracle though).

It's interesting to see so many languages fail to adopt the obvious characteristics that made/make PHP popular. PHP has started to stumble away from those same characteristics in the pursuit of specific agendas by framework developers and language contributors (PSRs are a myopic farce).

Performance, ease of deployment....who else has this? Oh yeah, Javascript. Never mind how horrid that language is, it matched PHP for ubiquity (thx to apple and other vendors standardizing and implementing so has gone away for the most part).

HVVM is more performant (for any non-trivial code). Will this be enough to give it superior momentum? Probably...until PHP finally just adopts it. Java's VM sucked and you wanted to always be using JRockit VMs 4 years ago. Eventually Oracle simply integrated them together. I see that as the eventual end here.

Re: Refactored PHP engine makes Wordpress 20% faster

#138
post #86

Earlier quoted context omitted.

CI is a badly designed and outdated framework. For real speed you should use something more professional like Symfony2.

I won't disagree with you that CI is outdated, but it was originally created to work around the limitations of PHP4 and early versions of 5.x. Looking back in hindsight, it may seem "badly designed", but that would be taking it out of context. Also, CI out performs Symfony in the web framework benchmarks: http://www.techempower.com/benchmarks/ . I certainly would never equate Symfony to "real speed".

You really think those guys know how to configure for production a hundred frameworks? If you base your decisions on those benchmarks, you are gonna have a bad time.

Re: Refactored PHP engine makes Wordpress 20% faster

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

Performance hasn't been a priority for WP in the last several releases. WP 3.3 gave a very nice bump, but no much since then.

Re: Refactored PHP engine makes Wordpress 20% faster

#140
post #138

Earlier quoted context omitted.

I won't disagree with you that CI is outdated, but it was originally created to work around the limitations of PHP4 and early versions of 5.x. Looking back in hindsight, it may seem "badly designed", but that would be taking it out of context. Also, CI out performs Symfony in the web framework benchmarks: http://www.techempower.com/benchmarks/ . I certainly would never equate Symfony to "real speed".

You really think those guys know how to configure for production a hundred frameworks? If you base your decisions on those benchmarks, you are gonna have a bad time.

I'm sure their benchmarks are more than adequate. In either case, if your barometer for what makes a good PHP framework is based on performance, you certainly wouldn't be choosing Symfony. If anything you'd go for for HHVM or Phalcon.
Post reply on HN