pgjones / hypercorn

Hypercorn is an ASGI and WSGI Server based on Hyper libraries and inspired by Gunicorn.
MIT License
1.18k stars 105 forks source link

Performance issue #219

Open davidbrochart opened 7 months ago

davidbrochart commented 7 months ago

I opened https://github.com/davidbrochart/anycorn/pull/12 to benchmark anycorn against hypercorn, and also asyncio against Trio, and I'm a bit puzzled by the results:

tests/test_performances.py::test_http_performances[asyncio-anycorn] HTTP GETs: 832
tests/test_performances.py::test_http_performances[asyncio-hypercorn] HTTP GETs: 23
tests/test_performances.py::test_http_performances[trio-anycorn] HTTP GETs: 754
tests/test_performances.py::test_http_performances[trio-hypercorn] HTTP GETs: 23

As you can see, hypercorn performs very badly. Do you have any idea why?

davidbrochart commented 7 months ago

Actually this seems to be the case only on Ubuntu. On macOS and Windows, hypercorn is a bit faster than anycorn.

hanzhenbjm commented 5 months ago

How is the performance of hypercorn as a service, receiving http2 requests?