title: Reduce size of tlog files produced by compiler
body: <p>Since our build on the build server is more and more slowing down I tried to find out what could be the cause. It seems it is mostly hanging in the disk IO operations of the <code>.tlog</code> files since there is no CPU load and still the build hangs. Even with a project containing only 10 cpp files, it generates ~5500 rows in the <code>CL.read.1.tlog</code> file.
  The suspicious thing is that the file contains the same headers over and over, especially boost headers which take up like 90% of the file. </p>
  
  <p>Is this really the expected behavior that those files are so big and have redundant content or is maybe a problem triggered from our source code? Are there maybe cyclic includes or too many header includes that can cause this problem? </p>
  
  <h1>Update 1</h1>
  
  <p>After all the comments I'll try to clarify some more details here. </p>
  
  <ol>
  <li>We are only using boost by including the headers and linking the already compiled libs, we are not compiling boost itself </li>
  <li>Yes, SSD is always a nice improvement, but the build server is hosted by our IT and we do not have SSDs available there. (see points below)</li>
  <li>I checked some perfcounters especially via perfmon during the compilation. Whereas the CPU and Memory load are negligible most of the time, the disk IO counters and also queue sizes are quite high all the time. Disk Activity - Highest Active time is constantly on 100&amp; and if I sort the Total (B/sec) it's all full with tlog files which read/write a lot of data to the disk. </li>
  <li>Even if 5500 lines of tlog seem okay in some cases, I wonder why the exact same boost headers are contained over and over. <a href="https://gist.github.com/Danielku15/5d4ab17f00b73eea800b86e530f409bf" rel="nofollow noreferrer">Here</a> a logfile where I censored our own headers.</li>
  <li>There is no Antivirus influencing. I stopped it for my investigations since we know that it influences our compilation even more. </li>
  <li>On my local developer machine with SSD it takes ~16min to build our whole solution, whereas on our build server with a "slower" disk it takes ~2hrs. CPU and memory are comparable. The 5500 line file just was an example from a single project within a solution of 20-30 projects. We have a project where we have ~30MB tlog files with ~60.000 lines in it, only this project takes half of the compilation duration. </li>
  <li>Of course there is some basic CPU load on the machine during compilation. But it is not comparable to other developer machines with SSDs. </li>
  <li>Our .net solution with 45 projects is finished in 12min (including setup project with WiX)</li>
  </ol>
  
  <p>As on developer machines with SSDs we have at least a reduction from 2hrs to 16mins with a comparable CPU/memory configuration my assumption for the bottle neck was always the hard disk. Checking for disk related operations lead me to the tlog files since they caused the highest disk activity according to permon. </p>