Commit before trying IntMap instead of vector for incidence graph
This commit is contained in:
+2
-1
@@ -76,7 +76,8 @@ doLoop spf window worldSideEffects eventFn startWorld = do
|
||||
maybeUpdatedWorld <- pollEvents >>= foldM (applyEventIO eventFn) (Just worldAfterSimStep)
|
||||
case maybeUpdatedWorld of
|
||||
Just updatedWorld -> do
|
||||
performGC
|
||||
performGC -- potentially use performMinorGC
|
||||
-- https://stackoverflow.com/questions/30244139/how-to-keep-very-big-elements-on-memory-without-exhausting-the-garbage-collector
|
||||
endTicks <- ticks -- it might be better to use System.Clock (monotonic)
|
||||
let theDelay = max 0 (spf + fromIntegral startTicks - fromIntegral endTicks)
|
||||
threadDelay (theDelay * 1000)
|
||||
|
||||
Reference in New Issue
Block a user