DEV Community

Discussion on: Why I'm dropping WordPress for Strapi hopefully forever

Collapse
bahamut657 profile image
MaDPaPo

From a NodeJs dev, php speed is not comparable to NodeJs speed...so the sentence where you said Nodejs is faster than PHP because it is asyncronous is a nosense. I'm using Strapi project too, but at least for the moment, there are some cons:
It is less stable than wordpress
require a lot of settings.
Some basic functionality(such navmenu) are not natively supported. You have to install plugin in order to manage it
At the end, it does not offer any Frontend UI(backend only) so it is,for now, more expensieve and less stable than WP and there are less provider that offer nodejs hosting

Collapse
brownio profile image
Antonio Djigo Author • Edited

For me it is, if it takes for me less time to see the changes, even if the only difference is that is is asynchronous, it works faster to for my eyes and the eyes of my users, but I get ur point.

Never noticed navmenu thing, as I normally use a front-end tool like NextJS to handle these things

Collapse
greenroommate profile image
Haris Secic

PHP on nginx is technically asynchronous (or any other server based on such methods) and so are the proper drivers written in C that are just being interfaced to PHP. Most of simple PHP code (which is most of pages) is simply C calls from PHP. You can measure speed yourself by using simple code without any framework in both Node.js and PHP. You'll see some surprises when you actually start measuring yourself instead of just copy pasting statements from other people. I can't really speak about frameworks as both of those languages are away from my scope of interest but I did use them. A good point in terms of "speed" would be to parse 1GB XML (or some similar format) through both languages and then tell me how good node.js is.
I've worked with quite a number of tech stack and by far the worst one I've personally used was Node.js. Anything above simple REST API (or GraphQL) processing small requests (and returning small portions of data) was quite painful. And given security issues in my eyes node.js goes hand in hand with PHP except that with PHP I could actually load 1GB file and process it without server CPU hitting 200%. I think most people comparing these things have no idea what their speaking of they just read stuff and accept as true without any interest going into details of why and how.
I get that you plug in WP and Strapi and see Strapi as faster but that's not even close to enough to compare languages like that.
To be clear I dislike them both equally so there's no biased response toward the PHP.

Thread Thread
hasnaindev profile image
Muhammad Hasnain

Amazing answer! I love unbiased views that are supported by actual statistics and experience.

Collapse
nicolus profile image
Nicolas Bailly • Edited

From a NodeJs dev, php speed is not comparable to NodeJs speed...

It doesn't seem completely insane to compare them. There is a lot of overlap between nodeJs and php (wether it's for building a website or a general purpose CLI tool, many of the things written with one could be written with the other).

The thing is, when you're building a website, the backend programming language is almost never the limiting factor. I suspect PHP8 and NodeJS 16 are roughly equivalent in terms of performance (ie: they're both more than fast enough for web usecases, and both a whole lot slower than Rust, Java, or Go), but the truth is I don't care, because the bottleneck is always on I/O operations : Database Queries, APIs, reading or writing files and so on...

I don't have experience with worpress but I suspect if it's slower than other solutions it's probably because of how it handles data in the database, and bot because it's written in PHP.