Hacker News new | ask | show | jobs
by tantaman 4821 days ago
Does anyone know what on earth is Play! doing that makes it is so slow?

I'd like to see Lift in there if you guys do another round.

3 comments

The Play JSON controller is using Futures to do JSON serialization.

https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...

Compare this to the Java Servlet, which just serializes directly in the Servlet callback.

https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...

The former seems like overkill.

This is not the version which was used in the tests. The tests used a earlier version.
Regarding Lift: good news, we received a pull request for that earlier this week. Too late for this week's run, but we'll try to get it in next week!

https://github.com/TechEmpower/FrameworkBenchmarks/pull/44

My best guess is that the java one is slow due to ebean (I've always seen huge performance improvements from switching to raw jdbc). The scala one I have no clue.
More likely because the version uses only as many threads as the cpu has cores. Whereas the servlet version for example has 128 thanks to the default resin configuration.
That would definitely be an issue as well. Although, this is easily configurable within the application.conf file if I remember correctly.