What I do know, is that NodeJS's reponses to requests are faster than PHP scripts, because NodeJS server is always running, in a loop waiting for events (this is how I understand this).
But I'm wondering what exactly happens when we make a request to a PHP script. Is the entire PHP engine loaded into memory every time? Or maybe something else must happen?
I'm asking this because I recently had a discussion with a friend of mine. I wrote a "comments" module to an existing application. When comments are displayed, I shorten longer comments and I add a link like "show more" - this link only makes a given comment visible, nothing more, because the full content of the comment is already there. And he said that in his opinion it's better to download only a part of a long comment at the beginning, and then when user clicks "show more" I should use AJAX to download full content of the comment and then display it. I always thought that every, even small request, is very CPU and memory greedy. Hence the question.