title: Huge memory usage of Python's json module?
body: <p>When I load the file into json, pythons memory usage spikes to about 1.8GB and I can't seem to get that memory to be released.  I put together a test case that's very simple:</p>
  
  <pre><code>with open("test_file.json", 'r') as f:
      j = json.load(f)
  </code></pre>
  
  <p>I'm sorry that I can't provide a sample json file, my test file has a lot of sensitive information, but for context, I'm dealing with a file in the order of 240MB.  After running the above 2 lines I have the previously mentioned 1.8GB of memory in use.  If I then do <code>del j</code> memory usage doesn't drop at all.  If I follow that with a <code>gc.collect()</code> it still doesn't drop.  I even tried unloading the json module and running another gc.collect.</p>
  
  <p>I'm trying to run some memory profiling but heapy has been churning 100% CPU for about an hour now and has yet to produce any output.</p>
  
  <p>Does anyone have any ideas?  I've also tried the above using cjson rather than the packaged json module.  cjson used about 30% less memory but otherwise displayed exactly the same issues.</p>
  
  <p>I'm running Python 2.7.2 on Ubuntu server 11.10.</p>
  
  <p>I'm happy to load up any memory profiler and see if it does better then heapy and provide any diagnostics you might think are necessary.  I'm hunting around for a large test json file that I can provide for anyone else to give it a go.</p>