Hapi: Performance improvements?

Created on 12 May 2016  ·  3Comments  ·  Source: hapijs/hapi

I've been looking at the TechEmpower web framework benchmarks (note: that link has some filters on) and was rather shocked to see how much of an overhead Hapi would add to Node.js on all of the various tests they ran.

For JSON serialization Hapi is apparently 2.7% the speed of raw Node.js, while Express is 52.7% of raw node (half as fast).

For single query we have Hapi at 6.4% of node, and Express at 26.3% (both are awful, but Hapi is somehow much worse).

OTOH, the good news is that Hapi does better on Multiple query and Data updates benchmarks (91.3%/29% for Hapi vs 35.2%/10.6% for express).

Now, I noticed that at least one of the TechEmpower benchmarks didn't make sense, but these folks have been doing this benchmarking thing for some time, and I'm guessing not everything is a mistake.

You can see their benchmark code for Hapi, Express and Node.js here: https://github.com/TechEmpower/FrameworkBenchmarks/tree/master/frameworks/JavaScript

Most helpful comment

This might be a good read if you haven't already seen this: https://hueniverse.com/2014/08/20/performance-at-rest/

Also with regards to JSON serialization, wondering if #3014 had made it into the benchmark.

All 3 comments

This might be a good read if you haven't already seen this: https://hueniverse.com/2014/08/20/performance-at-rest/

Also with regards to JSON serialization, wondering if #3014 had made it into the benchmark.

This might be a good read if you haven't already seen this: https://hueniverse.com/2014/08/20/performance-at-rest/

Nope, hadn't seen it! Thanks, that's helpful enough by itself for me to close this issue. I do appreciate all that Hapi does out of the box. :)

Also with regards to JSON serialization, wondering if #3014 had made it into the benchmark.

Doesn't seem like it, they were using Hapi 8.6.0. I don't know whether or not the changes since then would affect the benchmarks.

Wow, I'd say the fact that they did a benchmark on February 25, 2016 using Hapi 8.6 says something about their methods 👍

Was this page helpful?
0 / 5 - 0 ratings