It would be nice to see an apples/apples comparison between xgridcc and distcc rather than just gcc.
Also, I'm fairly sure this will not work with agents that do not have the Developer Tools installed. gcc is just one small part of the whole compile process. You need the other bits as well, not to mention all the headers and arch files that the DevTools installs.
The script also makes some huge assumptions about the location of application headers and such. These, and many other, problems are a big part of the reason distcc works on a file level, rather than a "build" or "make" level, as xgridcc sort-of does.
Now I relalize that this is just a demo, meant to illustrate what can be done with Xgrid. But these issues, along with the timings, seems to point strongly to "using the right tool for the job" and going with distcc. If you're trying to sell me on Xgrid, show me why it is better.
It seems that a more realistic approach would require the installation of the dev tools on all the agents. There is just way too much environment to bring with. Also, take the approach distcc does, and deal with one and only one file, and the options for that file. The ideal goal is to take any Makefile and be able to just change it so CC=xgridcc as you more or less can do with distcc.
Last of all, to get rid of the whole header issue, do the file pre-processing on the client, before the files are handed up to compile. This will suck in all the headers (application and system) and give you back one big file with no external references. More data in your source files to move around the grid, but no more second guessing what headers do or do not need to be moved around, or where those headers are located.
|
There are certainly countless ways of improving xgridcc, and you are quite welcome to give it a shot. It probably wouldn't be all that difficult, but certainly too much for an introductory article.
Cheers,
Drew