When I load the file into json, pythons memory usage spike to about 1.8GB and I can&#39;t seem to get that memory to be released.  I put together a test case that&#39;s very simple:<div><br></div><div>with open(&quot;test_file.json&quot;, &#39;r&#39;) as f:</div>
<div>    j = json.load(f)</div><div><br></div><div>I&#39;m sorry that I can&#39;t provide a sample json file, my test file has a lot of sensitive information, but for context, I&#39;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 &quot;del j&quot; memory usage doesn&#39;t drop at all.  If I follow that with a &quot;gc.collect()&quot; it still doesn&#39;t drop.  I even tried unloading the json module and running another gc.collect.</div>
<div><br></div><div>I&#39;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.</div><div><br></div><div>Does anyone have any ideas?  I&#39;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.</div>
<div><br></div><div>I&#39;m running Python 2.7.2 on Ubuntu server 11.10.</div><div><br></div><div>I&#39;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&#39;m hunting around for a large test json file that I can provide for anyone else to give it a go.</div>