How to improve link performance for a large C++ application in VS2005

前端 未结 15 1519
野的像风
野的像风 2020-12-02 11:30

We have fairly large C++ application which is composed of about 60 projects in Visual Studio 2005. It currently takes 7 minutes to link in Release mode and I would like to t

15条回答
  •  一向
    一向 (楼主)
    2020-12-02 12:10

    I just found out that we had by accident defined a large table of strings in a header file which got included in pretty much every (static) lib. (I am talking about a huge C++ project.) When the linker created the EXE, it looks like the unification of the table (there is only a single one ending up in the EXE) or the parsing of the libs took forever. Putting the table in a separate C++ file took a couple of minutes of the link on a relatively slow machine.

    Unfortunately, I don't know how to find stuff like that other than by chance.

提交回复
热议问题