Add spyne
Hi @plq,
Would you mind to add (or consent that we add) spyne in here ?
This project compare performance based on 3 routes :
-
GET/, SHOULD return a successful status code and an empty string -
GET/user/:id, SHOULD return a successful status code and the id -
POST/user, SHOULD return a successful status code and an empty string
Regards,
Hi there,
No problem. Is there anything I can help with?
Best,
Comments on the proposed benchmark:
Pure-Python frameworks spend an inordinate amount of time in parsing the incoming HTTP request. In very simple setups like the one in the benchmark, the amount of time spent in other parts of a web framework that do dispatch, validation, serialization etc. become just noise. So here you are only measuring the HTTP parser performance and not much else.
For example, Django performance deteriorates as the number of views increase: https://docs.djangoproject.com/en/2.2/topics/http/urls/#how-django-processes-a-request
Spyne however computes a lot of stuff in advance and while there are cases where O(n) dispatch is used, most of the time the dispatch ends up being just a dict lookup.
So the same benchmark above would have different results in a Django codebase with a single view or 1000 views defined (and the one we are looking for is the very last one).
I'm not trying to say that the benchmark is useless or anything. This benchmark is measuring an important metric (HTTP parser performance). However, it's not the only one that matters in real-world applications.
I hope it helps.
Cheers,
Hi @plq,
Thanks for you consent :heart: If you wish to create a PR, we will appreciate, but we can do later :stuck_out_tongue:
I know this benchmark is too simple (for now) but the purpose is more to have a comprehensive list of how frameworks perform with the same behaviour.
However, we plan to change the rules here => https://github.com/the-benchmarker/web-frameworks/issues/1728
I'm not a python expert so I you think of any tweak of any use case (in real-word), feel free to ask for addition, or PR
The value here is more to gather communities and to show performances (some other indicators will come) to enhance frameworks and to promote the awesome work done by awesome people in the tech word :heart:
@plq do you have time to contribute ?