do fewer commits during long batch jobs

10 thousand queue size does not use appreciable memory in my testing.
This commit is contained in:
Joey Hess 2012-06-12 16:24:19 -04:00
parent b240418acc
commit cb2255e93a

View file

@ -359,7 +359,7 @@ commitStaged = do
shouldCommit :: UTCTime -> [Change] -> Bool
shouldCommit now changes
| len == 0 = False
| len > 4096 = True -- avoid bloating queue too much
| len > 10000 = True -- avoid bloating queue too much
| length (filter thisSecond changes) < 10 = True
| otherwise = False -- batch activity
where