views:

53

answers:

1

I'm working on a Java utility that generates a bunch of XML documents matching a specific DTD using slightly randomized layout generation (so, for example, the document might look like <a><b><c /></b></a> or it might look like <a><b/><b><c>text</c></b></a>.

Right now, I've gotten it to the point where I can generate roughly 32,000 documents per second (storing the files in /dev/shm/), and I feel like that's pretty good, but it leaves me wondering if maybe I could do it faster in C++ or maybe some other language with super-fast XML generation. Any contenders?

A: 

As for speed probably not. You are most likely bound by hard disk speed at that point. Be sure you are using a buffered class to write to the disk, but otherwise I don't know if it'll get a lot faster.

You could run different threads/instances if you had two hard drives--but writing 2 streams to one drive only slows things down.

Bill K
I mentioned in the question that I'm generating data in /dev/shm - this writes files directly into memory instead of onto disk, so I'm absolutely not being limited by disk speed.
clee