O'Reilly logo

Building Applications with Scala by Diego Pacheco

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Play framework and high CPU usage

If you notice your CPU usage going higher than it should, do not worry; there is a fix for it. Actually, the issue is related to SBT. Just make sure that, when you run Activator, you pass the following parameter:

$ activator -Dsbt.task.forcegc=false.

Going back to ReactiveWebStore, let's create new routes. Open ReactiveWebStore/conf/routes:

    GET   /rnd/double  
    controllers.RndDoubleGeneratorController.rndDouble 
    GET   /rnd/call    controllers.RndDoubleGeneratorController.rndCall 
    GET   /rnd/rx      controllers.RndDoubleGeneratorController.rxCall 
    GET   /rnd/rxbat      
    controllers.RndDoubleGeneratorController.rxScalaCallBatch 

Once we have the new routes, we need to create the new controller. This controller needs to be located with the other ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required