Open aldem opened 1 year ago
Hey @aldem š
Firstly, thank you for raising this issue! This is a very interesting observation and I was not aware of such a pattern. Thank you for pointing it out. š
We execute the middlewares serially but I will have a look at how Blacksheep handles the middlewares. Thanks again!
Hey @aldem š
I was going through your issue and turns out we can chain middlewares in Robyn š This is unintentional but I really wanted to implement this feature anyway. LOL
Still need to find a proper way to speed it up though
Just tried robyn and in general I am impressed - it looks very promising, thank you! š
However, after first quick test for framework overhead (empty response) I noticed serious degradation in performance after adding an empty middleware.
My test code is dead simple:
I run it on Python 3.11.3 with robyn 0.36.0 (default config, single process), and test with
httpit -d60s -c8 'http://10.200.0.210:8000/'
(8 concurrent connections) and results are as follows:Both the server and the client are running on idling systems and network so other factors could be excluded, and results are consistent when tests are repeated.
What is interesting is that fastapi delivers similar results - rps are lower of course but empty middleware also introduces ~30% degradation, while blacksheep has almost no overhead.
Now the question is - what could be the possible reason for this degradation?