diff options
author | Jasper Van der Jeugt | 2020-08-04 13:44:21 +0200 |
---|---|---|
committer | Jasper Van der Jeugt | 2020-08-04 13:44:21 +0200 |
commit | 8402aeee145de98b4e7c8433975f3156f5ec0e1d (patch) | |
tree | 9fdde7a07cfc5f2c84a381e17e8a19c37d9816ea | |
parent | d1b1068d0c9dad94734438ddd6f5cfcec77396dd (diff) |
Optimization flags
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | client/src/Client.elm | 5 | ||||
-rw-r--r-- | server/cafp.cabal | 2 |
3 files changed, 4 insertions, 5 deletions
@@ -34,7 +34,7 @@ $(ELM_MESSAGES_SOURCE): stack_build server/assets/client.js: $(ELM_MESSAGES_SOURCE) $(ELM_SOURCES) mkdir -p server/assets - cd client && elm make src/Client.elm --output=../server/assets/client.js + cd client && elm make src/Client.elm --optimize --output=../$@ server/assets/client.html: client/index.html config.mk sed "s@\$$CAFP_BASE@$(CAFP_BASE)@" $< >$@ diff --git a/client/src/Client.elm b/client/src/Client.elm index 7a6f333..0494140 100644 --- a/client/src/Client.elm +++ b/client/src/Client.elm @@ -224,9 +224,8 @@ update msg model = case msg of WebSocketIn json -> case Json.Decode.decodeString Messages.jsonDecServerMessage json of Err str -> (Error <| Json.Decode.errorToString str, Cmd.none) - Ok (Messages.Welcome playerId) -> - Debug.log ("Welcome " ++ String.fromInt playerId) (model, Cmd.none) - Ok Messages.Bye -> Debug.log "Bye" (model, Cmd.none) + Ok (Messages.Welcome playerId) -> (model, Cmd.none) + Ok Messages.Bye -> (model, Cmd.none) Ok (Messages.SyncGameView gameView) -> case model of Game game -> (Game {game | view = gameView}, Cmd.none) diff --git a/server/cafp.cabal b/server/cafp.cabal index f80184c..0d6815c 100644 --- a/server/cafp.cabal +++ b/server/cafp.cabal @@ -54,5 +54,5 @@ Executable cafp-server Hs-source-dirs: src Main-is: Server.hs Default-language: Haskell2010 - Ghc-options: -Wall + Ghc-options: -Wall -O2 -threaded -rtsopts "-with-rtsopts=-N" Build-depends: base, cafp |