crayZsaaron/df-legends-reader — pull request #7 by PT-Fort (2013-08-21 02:50:18+00:00)
Title: Add memory profiling

This pull request adds memory profiling, which is provided by http://pythonhosted.org/Pympler/. I didn't see it as a Ubuntu package, so I think it will have to be installed with the source. However, I put the import in a try/except block, so the program shouldn't fail if pympler is not installed.

Profiling results for sample XML:
12 MB file: 1.7 seconds, took 60 MB
266 MB file: 40.9 seconds, took 1141 MB

The times above are with memory profiling not enabled. It will take longer with it enabled.