Holy Bloated XML Batman!
Published February 21, 2011
This weekend, I started to plan out on how to save the world data in chunks for my upcoming ProjectCube game. Just for fun and the simple fact it was easy to do, I tried saving a copy of the data using XNA's IntermediateSerializer. I knew it would be more bloated than something I could come up with myself, but wanted to see just how big it would be. After getting a test project setup and pouplated, I let it chunk thru the generating and saving of the level data for a region. A region in ProjectCubed consists of an array of 32x32 chunks, each chunk being 16x128x16 cubes. If you do the math, that is a grand total of over 33 million cubes (if every spot on the region is a cube.)
After it ran and saved the file, I just laughed and thought "Yea, I'm not using this." The file it saved was a whopping 780ish MB. Just for that small region, which ProjectCubed will be comprised of more than just 1 single region. After widdling away, and coming up with a nice and compact format, I took that 780MB file and got it down to a whopping 32MB. This is much more managable.
So in conclusion, IntermediatSerializer is great for something quick and small, not for a huge datastructure.
Source