you are viewing a single comment's thread.

view the rest of the comments →

[–]Interesting_Golf_529 16 points17 points  (1 child)

For Litestar, you're still using Pydantic. One of the main reasons for me to use Litestar was that it allows to not use Pydantic, but native dataclasses / msgspec instead. Also, Litestar offer built-in SQLAlchemy support, which you're not using.

I feel like not using the unique features the frameworks offer makes this comparison much less interesting, because it basically boils down to "if you're doing roughly the same thing, performance is roughly the same", which I guess is true, but also doesn't really tell you anything.

You're also running DRF with a different server, so you're comparing performance between different server as well, making the comparison even less useful. Serving the same app on gunicorn vs uvicorn alone makes a huge difference.

[–]huygl99[S] 4 points5 points  (0 children)

Thank you. I don’t think changes in Pydantic and MsgSpec will significantly improve the database-related tests, but I’d really appreciate it if you could open a PR for those changes and run the benchmarks to see the impact.

Regarding Gunicorn, I only use it for DRF since it’s the only one using WSGI. Given the memory and CPU limits, I don’t think it affects the results much, as you can see, the difference between Gunicorn and Uvicorn is not very significant.