I'm developing a Java application that will handle huge XML files (up to 300mb each and hundreds of thousands of lines). They are grouped usually with 20 to 40 similar XML files that also need processing. Work will be mainly CPU-bound, with some IO-bound related to opening the files and saving back the results.
I was wondering what would be better, as talking for performance-wise. Would it be better to create an application that I could invoke through a script like this:
java -jar myApp.jar huge_1.xml java -jar myApp.jar huge_2.xml java -jar myApp.jar huge_3.xml
or maybe handle it all in one application that will create up to
N threads that could be invoked like this?
java -jar myApp.jar huge_1.xml huge_2.xml huge_3.xml
The xml files can be worked on independently, the final result will be grouped up later for analysis.
In a long-term vision, which version (if any at all) would be of better use?