title: why does converting a python 'shelve' to 'dict' use so much memory?
body: <p>I have a very large python shelve object (6GB on disk). I want to be able to move it to another machine, and since shelves are not portable, I wanted to cPickle it. To do that, I first have to convert it to a dict. </p>
  
  <p>For some reason, when I do <code>dict(myShelf)</code> the ipython process spikes up to 32GB of memory (all my machine has) and then seems to hang (or maybe just take a really long time). </p>
  
  <p>Can someone explain this? And perhaps offer a potential workaround? </p>
  
  <p>edit: using Python 2.7</p>