On 14.11.2014 10:43, zhangjun.julian wrote:

emptyMap = DM.empty::(DM.Map (String,String) Int)



Laziness makes your data swell.

1) Try using ByteString or Text instead of String.
2) Try the UNPACK pragma, AFAIR it requires -O2.
    data Key = Key {-# UNPACK #-} !ByteString   {-# UNPACK #-} !ByteString
    https://hackage.haskell.org/package/ghc-datasize - this package will help you to determine the actual data size

--
Wojtek