diff options
author | Joey Hess <joey@kitenet.net> | 2014-01-05 21:30:48 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-01-05 21:30:48 -0400 |
commit | 4cf6d95c1a9d10cb59669eaceafce4c7a3155eb6 (patch) | |
tree | 2ed9440dd31cb4cb925e9010bd54694b8c776519 /Assistant/Alert | |
parent | 5d305f1337e88ae7a07f54adc06c4a9d1d39f872 (diff) |
assistant: Fixed several minor memory leaks that manifested when adding a large number of files.
Diffstat (limited to 'Assistant/Alert')
-rw-r--r-- | Assistant/Alert/Utility.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Assistant/Alert/Utility.hs b/Assistant/Alert/Utility.hs index db2ea1925..960c3385b 100644 --- a/Assistant/Alert/Utility.hs +++ b/Assistant/Alert/Utility.hs @@ -13,7 +13,7 @@ import Utility.Tense import qualified Data.Text as T import Data.Text (Text) -import qualified Data.Map as M +import qualified Data.Map.Strict as M {- This is as many alerts as it makes sense to display at a time. - A display might be smaller, or larger, the point is to not overwhelm the @@ -122,7 +122,7 @@ mergeAlert i al m = maybe updatePrune updateCombine (alertCombiner al) let (f, rest) = partition (\(_, a) -> isFiller a) l in drop bloat f ++ rest updatePrune = pruneBloat $ M.filterWithKey pruneSame $ - M.insertWith' const i al m + M.insert i al m updateCombine combiner = let combined = M.mapMaybe (combiner al) m in if M.null combined |