News for hackers. Stuff that matters.
Re:Show HN: Robyn – "Batman Inspired" Python Web Framework B... by linwangg on Sunday March 02, 2025 @05:23AM (#43229060)
The biggest differentiator between Robyn and frameworks like FastAPI or Sanic seems to be the Rust runtime. But is Python's async actually the bottleneck that Rust is solving here?
Re:Show HN: Robyn – "Batman Inspired" Python Web Framework B... by bvrmn on Sunday March 02, 2025 @07:45AM (#43229948)
Actual bottleneck in examples is sqlalchemy, like 10x overhead easily. I find it quite funny. There is no real difference in web frameworks for real apps in terms of overhead.
Re:Show HN: Robyn – "Batman Inspired" Python Web Framework B... by michaelcampbell on Sunday March 02, 2025 @08:32AM (#43230336)
I've often wondered about this; are there studies/tests to this effect anywhere that you can link?
Re:Show HN: Robyn – "Batman Inspired" Python Web Framework B... by bvrmn on Monday March 03, 2025 @02:36AM (#43239213)
Returning static "hello world" response for slowest python framework is easily not bigger than 1ms (for fast frameworks it's 0.1ms or lower). Good luck to make the rest of your app to make something comparably fast if db or network is involved.
Re:Show HN: Robyn – "Batman Inspired" Python Web Framework B... by rybosome on Sunday March 02, 2025 @11:42AM (#43232199)
I hear this sort of thinking repeated often, and it makes sense at an intuitive level.

However, my experience is that this isn’t always the case. My company has a medium-large Python web app in production, and having viewed performance profiles, I can say definitively that Python code execution occupies a non-trivial amount of processing time. Of course the single largest time sink is the LLM requests we make, but if we could magically nullify the Python processing time, our latency would significantly improve.

The culprit in this case may be specific to FastAPI and Pydantic rather than Python generally, but the point still holds that not all web frameworks and resultant apps are equivalent.

That said, I’ve been dreaming of rewriting large chunks of it in golang. I’ve always known Python was relatively slower than other languages, but I saw a recent benchmark measuring golang as 50x faster than Python. Perhaps the benchmark won’t translate to real world performance, but still - 50x is difficult to ignore.

Re:Show HN: Robyn – "Batman Inspired" Python Web Framework B... by odie5533 on Monday March 03, 2025 @01:21AM (#43238866)
There are wider performance gaps between Python-based frameworks and things like using Rust+Axum or Go.
Re:Show HN: Robyn – "Batman Inspired" Python Web Framework B... by vednig on Sunday March 02, 2025 @06:29AM (#43229365)
Global Interpreter Lock (GIL) limits how effectively multiple threads can be used in Python.

Hence the event loop in Rust runtime for async makes more sense here.

Re:Show HN: Robyn – "Batman Inspired" Python Web Framework B... by Kwpolska on Sunday March 02, 2025 @08:16AM (#43230220)
The GIL which is currently being removed from CPython?
Re:Show HN: Robyn – "Batman Inspired" Python Web Framework B... by vednig on Sunday March 02, 2025 @08:46AM (#43230428)
Yeah, in newer versions
Re:Show HN: Robyn – "Batman Inspired" Python Web Framework B... by mont_tag on Sunday March 02, 2025 @10:15AM (#43231203)
An async event loop doesn't have anything to do with the GIL or threads.

Async is all about cooperative concurrency where a task yields in places that it would normally block. The tasks can all run in a single thread.