Skip to content

Commit

Permalink
Use "-N" RTS flag to enable multi threading
Browse files Browse the repository at this point in the history
  • Loading branch information
mpscholten committed Dec 18, 2020
1 parent 0538eb8 commit 44e7b82
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exe/IHP/IDE/DevServer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ stopFileWatcher _ = pure ()

startGHCI :: IO ManagedProcess
startGHCI = do
let args = ["-threaded", "-fomit-interface-pragmas", "-j", "-O0", "+RTS", "-A512m", "-n4m", "-H512m", "-G3", "-qg"]
let args = ["-threaded", "-fomit-interface-pragmas", "-j", "-O0", "+RTS", "-A512m", "-n4m", "-H512m", "-G3", "-qg", "-N"]
createManagedProcess (Process.proc "ghci" args)
{ Process.std_in = Process.CreatePipe
, Process.std_out = Process.CreatePipe
Expand Down
1 change: 1 addition & 0 deletions ihp.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ executable RunDevServer
build-depends: IHPFramework
hs-source-dirs: exe
main-is: IHP/IDE/DevServer.hs
ghc-options: -funfolding-use-threshold=16 -optc-O3 -funbox-strict-fields -fconstraint-solver-iterations=100 -fexpose-all-unfoldings -flate-dmd-anal -fspec-constr-keen -fspecialise-aggressively -fstatic-argument-transformation -fmax-worker-args=200 -threaded -haddock -fmax-worker-args=200 -fstatic-argument-transformation -with-rtsopts=-A512m -with-rtsopts=-n4m -with-rtsopts=-N

executable new-application
import: shared-properties
Expand Down
2 changes: 1 addition & 1 deletion lib/IHP/Makefile.dist
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ GHC_EXTENSIONS+= -XDerivingVia
GHC_EXTENSIONS+= -Werror=missing-fields
GHC_EXTENSIONS+= -fwarn-incomplete-patterns

GHC_RTS_FLAGS := -A256m -n2m
GHC_RTS_FLAGS := -A256m -n2m -N

GHC_OPTIONS=-threaded -i. -ibuild -iConfig -iIHP
GHC_OPTIONS+= ${GHC_EXTENSIONS}
Expand Down

0 comments on commit 44e7b82

Please sign in to comment.