Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

Thoughts on Performance

lhofhansl edited this page Oct 30, 2010 · 5 revisions

I did some tests with a plain Java implementation. Comparing to Benchmarks I find that in plain Java I can get 17376 reqs/sec for the "minimal http/1.0" case and 58058 reqs/sec for the "minimal http/1.1" case. So there is quite a bit room for improvement.

  • Optimizations
    • Implement tight-loop code in Java
    • (Implement the event loop in Java) I've since tried this. When the handler code is still in JS that leads to no performance improvement
    • Cache Http-Parser Generator functions, because they are expensive to create (mostly an issue for HTTP without keep-alive)
    • Maybe a all-round better approach is to start with my Java NIO implementation and add Javascript callbacks to it. I tried that as a quick test and I get about the same raw number as above. (so about 17500 reqs/sec and 58000 reqs/sec, and this is with Javascript callbacks!)
Clone this wiki locally