6

I am managing a big application with about xxx source files (Visual Studio 2010).

Since quite some years we compile our release builds with /Zi to get a PDB file which is stored in our symbol server. Over the years we noticed that our build scripts got slower and slower, and now it takes more than 2 hours to build the executable.

Questions like What are the implications of using /Zi vs /Z7 for Visual Studio C++ projects? seem to indicate that /Z7 is an old format, and that /Zi is preferred.

Nevertheless we tried executing our build scripts with /Z7 and we saw a big time reduction from over 2 hours to about 20 minutes. We also experimented with using /Zi but 1 PDB file per source file (which the linker still merges together in one big PDB file) and this also improves compilation performance, but slightly decreases link time performance.

To optimize build times I would like to switch back to /Z7 (the linker still generates a PDB file in the end), but I'm not sure whether this will have an impact on the 'debuggability' of the application.

Questions:

  • Is the internal debugging format of the PDB file generated by the linker different when compiled with /Z7, compared to /Zi (maybe the format is the same, just the place where the debug info is stored by the compiler is different)?
  • Does /Z7 prevent some kinds of debugging compared to /Zi?
  • Which debug format (/Zi, /Z7) is advised in general for release builds?
Community
  • 1
  • 1
Patrick
  • 23,217
  • 12
  • 67
  • 130
  • 3
    /Z7 generates debug info in the ancient CodeView debugger format. It is stored inside the .obj file instead of the separate program database, contention in parallel builds could be an explanation. The mspdbsrv.exe service arbitrates access to the file. Exactly what features you lose isn't documented anywhere I know of. I suspect you're on your own to write the answer to this question. – Hans Passant Oct 23 '13 at 14:26
  • 1
    From what I have observed building my code on 8 and 12 threaded systems is that contention in parallel builds seems to be at least part of the problem. – drescherjm Oct 23 '13 at 14:57

0 Answers0