News for hackers. Stuff that matters.
Re:“My current thinking about Python asyncio & why I hate it” by coldtea on Saturday June 10, 2023 @08:01AM (#36269761)
>For a typical web application, a significant percentage of the total time a request takes will be spent in Python (rendering a template, for example) - the amount of time spent reading-from and writing-to the database driver socket, for example, is often negligible.

Huh? In what planet? Rendering a template takes negligible time compared to the IO latencies to read from the database (even for a fast simple query) or a cold file on the filesystem.

This (and not the extra v8 speed) is why a single process Node.js server gets great performance for a typical web app, better than anything single process but synchronous Python could ever dream of -- and that a blocking Node.js would fall back to Python-level performance for web serving scenario.

>Whether they're actually going fast or not is anyone's guess. The best you're likely to see is some dubious graph from a half-baked benchmark.

Dubious compared to what? The "take my word for it, it is bad" blogger opinion?

Re:“My current thinking about Python asyncio & why I hate it” by laurencerowe on Saturday June 10, 2023 @01:07PM (#36272378)
It really depends on what you're doing. In my experience it's quite common for moderately complex python web services to be mostly CPU bound if you put the database server on the same machine.

If you're talking to a regular sql database you'll usually find the database itself limits concurrency so there's little advantage to async io over threading. You really only see the advantage of async io in proxy like scenarios or where you're managing thousands of long lived connections (web sockets etc.)

Re:“My current thinking about Python asyncio & why I hate it” by norwalkbear on Saturday June 10, 2023 @02:37PM (#36273497)
I think python/ruby SAAS typically do a lot more logic in the app layer than people think.