[cfe-dev] Question on clang design - Why clang doesn't use pooling of Process

Journeyer J. Joh oosaprogrammer at gmail.com
Wed Jul 25 04:46:57 PDT 2012


Hello, list

I am reading clang source code.
And while my reading of it I found that clang as a driver invokes
another clang as a worker process to convert a input file to the
output file.
This method looks weird to me because the driver clang invokes worker
clang so many times. It would be the number of input source  file!
This means that 1000 C source code compile would invokes clang 1000 +
1 times.

For server programming this kind of work is handled by processpool or
threadpool.

Pooling invokes process' or threads only a certain times like 10 times
and with this 10 process of threads tasks are handled with no more
loading of process load or creating new thread load.

This is just my personal question and I believe clang's current
architecture would have reasonable reasons for every implementations
of it.

Any answer is welcome ^^; I want to learn from you.

Thank you very much in advance as always.

Cheers!

Journeyer J. Joh
-- 
----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l  d o t  c o m
----------------------------------------



More information about the cfe-dev mailing list