this post was submitted on 30 Oct 2023
976 points (96.1% liked)

Programmer Humor

31217 readers
515 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 20 points 8 months ago (2 children)

Uncached server side rendered response times in double digit milliseconds.

Thirst thought, that sounds slow. But for the use case of delivering html over the Internet it is fast enough.

[–] moriquende 16 points 8 months ago

Get this man some water.

[–] [email protected] 3 points 8 months ago (1 children)

Double digit milliseconds sounds slow to you?

[–] [email protected] 4 points 8 months ago (2 children)

For a bit of templating? Yes! What drives response times up is typically the database or some RPC, both of which are out of control of PHP, so I assume these were not factored in (because PHP can't win anything there in a comparison).

[–] [email protected] 4 points 8 months ago (1 children)

Anything under like 100ms load is instant to the user, especially a page load. It's a balancing act of developer experience vs performance. To split hairs over milliseconds seems inconsequential to me. I mean, PHP requires $ before variables! That's the real controversy :p

[–] [email protected] 4 points 8 months ago

Anything under like 100ms load is instant to the user, especially a page load.

True, but it accumulates. Every ms I save on templating I can "waste" on I/O, DB, upstream service calls, etc.

[–] jaybone -1 points 8 months ago (1 children)

If it’s stateless and nothing is kept in memory, can you have a connection pool?

[–] [email protected] 0 points 8 months ago

If you run it in old-school CGI mode, no, because each request would spawn a new process. But that's nowhere near state-of-the-art. So typically you would still have a long-running process somewhere that could manage a connection pool. No idea if it does, though. Can't imagine that it wouldn't, however, since PHP would be slaughtered in benchmarks if there was no way to keep connections (or pools) open across requests.