Вопрос

The results from round 8 of this benchmark are as follows for play for the 'multiple queries' benchmark (see the tabs on the top) : http://www.techempower.com/benchmarks/#section=data-r8&hw=i7&test=query

play-slick 2,299 play-java-ebean 4,759

I'm a bit surprised that slick was so much slower in their benchmarks.

The source code for the slick version is here, are there any missing optimizations they could have made?

https://github.com/TechEmpower/FrameworkBenchmarks/tree/master/play-slick

Это было полезно?

Решение

First of all they are using Slick 1. And yes, they are missing important optimizations. They are not-precompiling queries, which means the Slick Scala-to-SQL compiler has to run again and again for every query. Slick 1 only supported precompiled read-queries. Slick 2 added pre-compiled write-queries. http://slick.typesafe.com/doc/2.0.1/queries.html#compiled-queries

I created a PR upgrading it to Slick 2 and optimized queries. https://github.com/TechEmpower/FrameworkBenchmarks/pull/824

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top