I am a newbie using Java to do some data processing on csv files. For that I use the multithreading capabilities of Java (pools of threads) to batch-import the csv files into Java and do some operations on each of their lines. On my quad-core, multithreading speeds up the process a lot.
I am curious to know how/whether multiprocessing would speed up the operations even more? If so, is there a tutorial available somewhere? (the Java Basic Tutorial mentions a class, but I am not familiar enough with the syntax to understand the class by myself:
from http://download.oracle.com/javase/tutorial/essential/concurrency/procthread.html:
Most implementations of the Java virtual machine run as a single
process. A Java application can create additional processes using a
ProcessBuilder object. Multiprocess applications are beyond the scope
of this lesson [where are they explained then?].
No, in fact it would likely make it worse. If you were to switch from multithreading to multiprocessing, then you would effectively launch the JVM multiple times. Starting up a JVM is no simple effort. In fact, the way the JVM on your desktop machine starts is different from the way an enterprise company starts their JVM, just to reduce wait time for applets to launch for the typical end-user.