I am trying to implement the accepted answer from this question for ID generation and using XML files for storage of my content and for the content IDs table.
The idea is each content item would be stored (serialized) as my-content-item-slug-374871.xml, where the number is the random ID that the content item will be given from the IDs table (from the ones that are not yet taken). My requirement is that the ID is a six digit number (display requirements) between 100000 and 999999, so effectively we will only be able to create 899999 content items but that should be enough. If you wonder why such a requirement, I can only say that I don't want IDs starting from zero and I don't want IDs such as GUIDs (which would be way easier to create and maintain, I know) because ID will be used in MVC routes (much like the SO's URLs).
So for starters I decided to create a Dictionary, where key is the ID and value determines whether it is used or not (true if used, false if available). I then serialize this object into XML file using DataContractSerializer.
The file is 72MB long and here I think the problems start to appear. First of all, I just tried to open this file in VS2010, Notepad, Wordpad and IE and they all crashed and memory consumption went skyrocket. But the application seems to have no problems with it. Still I think this will be huge memory and CPU hog and performance will suffer.
Am I right in my assumptiosn and if so, what are my other options?