I'm working on a game in XNA with my goal being that it is fairly data driven so that I can easily tweak the system without having to update code. The research I've done shows that using XML files combined with the content pipeline should provide me with what I need to accomplish this.
That being said, being a developer that really has only been exposed to object oriented programming I have this "one class per file" mindset that I really like because it makes finding and updating what I want to change very easy. This leads me down a path of wanting to set up a system where instead of a large, heavily nested XML file that defines everything (like the web.config files I am used to), I want to go with a folder structure with files that define individual objects - or at the very least something in between. At this point in time I'm not entirely sure how many files I could end up having but I believe it could escalate to a point where it could cause a performance problem if done wrong and if I discover a performance problem because of it, redesign and consolidation of it all could be a big enough chore that I definitely want to try my best to make the right decision up front.
Usually I would see the above mentioned approach being a big performance hog because of the large amount of file IO that would have to be done when loading up the game. Based on my experience with images in the content pipeline, I am assuming that XML files are also combined into a single XNB file when compiled. From this my questions become:
- If it is true that all XML files become a single XNB file should I still expect a notable performance loss when loading the data from these "files" or has that overhead disappeared since its all within a single XNB file?
If yes I am sure there tools out there that can make managing / updating a single and very large XML file more manageable which I will begin researching and am open to suggestions on.