question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve techempower benchmark

See original GitHub issue

So, Javalin is back here: https://www.techempower.com/benchmarks/#section=data-r21&l=zik0vz-6bj&test=composite

But it’s not looking so fast. Maybe we can fix that?

The repo for the benchmark code is here: https://github.com/TechEmpower/FrameworkBenchmarks/tree/master/frameworks/Java/javalin

Some things we should do:

  • Update to newest Javalin
  • Replace Pebble with JTE and precompiled templates
  • Remove before/after/error stages from request lifecycle
  • Cleanup database controller
  • Use custom JSON setup
  • Enable Loom via --enable-preview and Java 19
  • Copy DB stuff from vertx or jooby?
  • ~Enable HTTP2~ (not supported by wrk)
  • ~See if we can make Jackson faster~

Here is our branch: https://github.com/javalin/FrameworkBenchmarks/tree/javalin-improvements

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:26 (26 by maintainers)

github_iconTop GitHub Comments

1reaction
zugazagoitiacommented, Oct 8, 2022

@zugazagoitia is there a warmup phase before the benchmark? If so, the JIT should probably beat AOT GraalVM compiler in terms of throughput.

There is a warmup, I have no idea if this would improve performance but either way I’ll make a graalvm branch and run some benchmarks, you might be right.

looked into vertx-web and jooby, and they both have -XX:+AggressiveOpts JVM option set. Maybe we could give it a try how this affects the benchmark?

After a litte googling I found this: https://bugs.openjdk.org/browse/JDK-8199847

Looking at the results, it seems the DB is also a bottleneck at the moment. I tried to look into how other frameworks connect to the DB. The frameworks with high scores I looked at (officefloor, inverno, jooby) all use vert.x for DB connection handling. Maybe it would be possible to replace Hikari with https://github.com/eclipse-vertx/vertx-sql-client?

I believe the DB to be the biggest bottleneck right now, we have major improvements comming to Json on a dsl-json branch I’m working on. Could you try and replace it?

Also, I’ve enabled actions for the repo. They (TechEmpower) encourage forks to use the workflow to test benchmarks, it can verify that the endpoints provide valid output.

1reaction
tipsycommented, Oct 8, 2022

@zugazagoitia a lot of people would appreciate that in general, the tutorial is outdated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Round 21 results - TechEmpower Framework Benchmarks
Rnk Framework Best performance (higher is better) Best performance (higher is better) Er... 1 drogon‑core 616,607 100.0% 0 2 xitca‑web 587,955 95.4% 0 3 drogon 556,046...
Read more >
JSON performance in TechEmpower benchmarks · Issue #1177
The latest TechEmpower benchmarks have been released. Axum is doing extremely well and is in the top ten.
Read more >
TechEmpower Framework Benchmarks - Twitter
Continuous Benchmarking results for the TechEmpower Web Framework Benchmarks Project. ... a 70% speed increase on TechEmpower Fortunes benchmarks ...
Read more >
TechEmpower benchmarks for opium running httpaf are ready
Source for the TechEmpower Framework Benchmarks project - TechEmpower/ ... Am I doing something wrong, how can I get better performance?
Read more >
I was looking at TechEmpower benchmarks, and noted that ...
34 votes, 55 comments. Hello, maybe you can explain why PHP (php-ngx) seems to be better than Node. Am I reading the score...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found