On Sat, Nov 12, 2011 at 10:59 AM, Tian Fang <span dir="ltr"><<a href="mailto:tfang.ca@gmail.com">tfang.ca@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi,<br>
<br>
Come cross this wonderful tool, distcc with the pump mode. Have a<br>
quick question on the implementation of the pump mode.<br>
<br>
My understanding of one purpose of include server is to find out the<br>
include files for each source code to be distributed. include server<br>
implements its own parser to preprocess the source files to get the<br>
list of files. Wondering why not using the -M opt provided by the<br>
compiler instead of writing the new parser. Appreciate someone could<br>
share some reason behind this design.<br></blockquote><div><br></div><div>The point of pump mode is to distribute the preprocessing.</div><div>Using the -M option of the compiler implies running preprocessing locally.</div>

<div>Using pump mode's include server can be much more efficient than preprocessing locally,</div><div>because it caches the results across multiple compiles within a build,</div><div>processing each included file only once, rather than once for every time it is included.</div>

<div>For large builds this typically results in a significant speed-up,</div><div>averaging at about a factor of two speed-up if you have sufficient distcc servers available.</div><div><br></div><div>Cheers,</div><div>  Fergus.</div>

</div><div><br></div>-- <br><div>Fergus Henderson <<a href="mailto:fergus@google.com" target="_blank">fergus@google.com</a>></div><div><br></div><div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">"Defend the user, exclude no one, and create magic." -- Eric Schmidt.</span></div>

</div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><br></span></div><br>