
12 Aug
2008
12 Aug
'08
9:01 p.m.
Doesn't Data.Map.size run in O(1) time? Maybe something like using different encodings for big maps in the default implementation would help?
ugh, of course. Ok, so I fixed it to: loadState db = do d <- decode <$> B.readFile stateFile let force = sum $ map (sum . map fromEnum . M.keys) $ M.elems d print force force `seq` atomically $ writeTVar db d (my keys are dates, which are Enum). This should look at every key in every inner map. Shouldn't that be sufficient to force the entire data set (or do I have to touch the fields in the data elements too?). I still get the same error condition.
Felipe.
Tim Newsham http://www.thenewsh.com/~newsham/