XML Structure - 1 File or Multiple?

Razor-Inc

New Member
Just wondering what you current best practice or your preferences dictate with regards XML files?At the moment, I have a system (Java) which reads a directory, loops through the files & extracts the XML into objects. Each user has their own XML file:user-0.xml --> \[code\]<user id="0" username="UserName1" password="whatever">\[/code\]user-1.xml --> \[code\]<user id="1" username="UserName2" password="whatever" />\[/code\]The issue is that de-serializing these files becomes slow when I do a large number. (10,000 takes about 5 seconds on my laptop). I am trying to future proof my system so that it could handle many thousands of XML documents (I plan on using the same approach to write a forum system that could conceivably have many thousands of threads / replys etc).Would it be easier / better / safer / quicker (please advise) to save them all in one XML file then just de-serialize that?users.xml --> \[code\]<user id="0" username="UserName1" password="whatever" /><user id="1" username="UserName2" password="whatever" />\[/code\]ps. Note that I am encrypting the passwords.
 
Back
Top