Live data from Hacker News

Refactored PHP engine makes Wordpress 20% faster

news.php.net

81–90 of 147 posts

Re: Refactored PHP engine makes Wordpress 20% faster

#81
post #10

Great news. HHVM and now PHP 5.7, both with JIT - the future of PHP looks bright.

To my knowledge a JIT compiler is not being added to PHP 5.7. Can you clarify your comment or provide a link to the source where you heard this?

I'm not the person you replied to, but I got the same impression.

The linked email in turn links to the PHP NG page (https://wiki.php.net/phpng) on which the version number mentioned is 5.7.0-dev

Re: Refactored PHP engine makes Wordpress 20% faster

#83
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…

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

And then goes on to say:

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

With zero references to any data.

Re: Refactored PHP engine makes Wordpress 20% faster

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

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

I really doubt that. In my experience there haven't been a single time when someone attacking PHP actually knew something about it that wasn't outdated by at least 5 years.

It's funny how difficult it is for people like you to grasp that the language and its ecosystem evolves every day, much faster than other languages. Just look at what you just said. How can someone have been where I am right now? They used a time machine? Or you are assuming that the language stopped evolving at some point, or never evolved at all in the first place?

Re: Refactored PHP engine makes Wordpress 20% faster

#85
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'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!

Symfony can be overwhelming for a newbie, but that's because web development is becoming a bigger field every day. There is so much to learn, and Symfony will teach you all kinds of best practices and other things that are not framework-specific at all. To learn Symfony is to learn web development done right.

Laravel is basically a wrapper around Symfony, to make it simpler and easier. A newbie might prefer to use that, but at some point after feeling comfortable with the basics like MVC, ORM, etc. you will definitely want to move to the more professional Symfony.

Re: Refactored PHP engine makes Wordpress 20% faster

#86
post #24
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!

Agreed. I ran a benchmark against CodeIgniter on a test box recently and was suprised that a single query app performance went from around ~20k req/s with raw PHP (no framework) to around ~3k req/s with CI and thought that was bad for a framework. I didn't realize Wordpress performance was so much worse especially given its popularity. Most Wordpress sites use a caching plugin like WP Super Cache or Varnish-type setu…

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

Re: Refactored PHP engine makes Wordpress 20% faster

#87
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…

There are many good PHP web frameworks out there today, yes. These don't somehow erase PHP's core flaws as a language though.

You can make a new project in Symfony or Laravel, sure, but you'll get that same niceness plus way more goodies if you use a popular Python or Ruby framework.

Re: Refactored PHP engine makes Wordpress 20% faster

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

Varnish fixes everything.

Drupal's big two issues are bootstrapping drupal, because all those module hooks stack up quick, and the sometimes large amount of queries run to generate a page. Drupal 8 has gotten better about not loading half of the world when a blog post is loaded, but 7 is just a wall of functions.

Re: Refactored PHP engine makes Wordpress 20% faster

#89
It is good to hear that they even managed to refactor their code, even if you don't look at the performance benefits. Now, I hope that their next major upgrade will be a complete API overhaul, though it means making the existing thousands of themes and plugins incompatible.

Re: Refactored PHP engine makes Wordpress 20% faster

#90
post #59

Earlier quoted context omitted.

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.

Mostly CPU usage would jump to 100%, it's not mysql or RAM shortage. I know an Intel atom isn't much, but it ought to do better than this, especially compared to custom software.
Post reply on HN