I have been doing some research in to java servlets and I am having trouble understanding why it more efficient then a cgi based solution.
The reason for my lack of understanding is that java servlets run on the thread per request model, meaning that a new thread is spawned or taken from a pool of threads each time a request is made. While a cgi based solution would create a new process per request.
My question is, why would creating a process per request be less efficient then a thread, after all in each process is a a thread doing the work, So why is cgi less effecient?