force state strictly
When converting to the strict state monad, I missed this place where thunks to the state could be built up, possibly. This seems to make it run in some percentage less memory.
This commit is contained in:
parent
59b2adea4f
commit
0ef6d86873
1 changed files with 3 additions and 1 deletions
|
@ -71,7 +71,9 @@ tryRun' :: Integer -> Annex.AnnexState -> Command -> [CommandCleanup] -> IO ()
|
|||
tryRun' errnum _ cmd []
|
||||
| errnum > 0 = error $ cmdname cmd ++ ": " ++ show errnum ++ " failed"
|
||||
| otherwise = return ()
|
||||
tryRun' errnum state cmd (a:as) = run >>= handle
|
||||
tryRun' errnum state cmd (a:as) = do
|
||||
r <- run
|
||||
handle $! r
|
||||
where
|
||||
run = tryIO $ Annex.run state $ do
|
||||
Annex.Queue.flushWhenFull
|
||||
|
|
Loading…
Reference in a new issue