in reply to Re^6: Libxml parser cosuming 100% cpu
in thread Libxml parser cosuming 100% cpu
It's running at 100% because it doesn't waste time waiting for the disk, waiting for packets, etc.
Again, making it use less CPU will necessarily make it slower
And yes, I saw your pseudocode. It says you are parsing and extracting data from 100,000 XML documents in 2.5 minutes, which is one every 0.015 seconds, which I think is quite fast.
If you really want to reduce the time needed, you should rethink how you store your data in order to avoid parsing 100,000 XML documents. Alternately, parallelize the program and throw more CPUs at it. (For example, Having 10 cores do 10,000 XML docs each could reduce the time from 2.5 minutes to as little as 15 seconds.)
|
|---|