switch to the strict state monad

I had not realized what a memory leak the lazy state monad could be,
although I have not seen much evidence of actual leaking in git-annex.
However, if running git-annex on a great many files, this could matter.

The additional Utility.State.changeState adds even more strictness,
avoiding a problem I saw in github-backup where repeatedly modifying
state built up a huge pile of thunks.
This commit is contained in:
Joey Hess 2012-01-29 22:55:06 -04:00
parent 0609e10239
commit a964012fc3
5 changed files with 30 additions and 16 deletions

View file

@ -13,7 +13,6 @@ module Git.CatFile (
catObject
) where
import Control.Monad.State
import System.Cmd.Utils
import System.IO
import qualified Data.ByteString.Char8 as S