none
Very long link time

    Question

  • I'm working on a project where we are coming to an end and we're getting link times in debug with incremental linking on of over 15 minutes.

    Currently, our work around is to link with out debug symbols and then run another link with debug symbols. Without debug symbols we can link in a few seconds. This lets us try the build and if we need to debug we have to wait the full 15 minutes.

    Any one have any ideas how to speed this up?

    Thank you,
    David Neubelt
    Tuesday, June 12, 2007 7:04 PM

Answers

  • There are the /Bt and /time switches. The may give you a basic idea on what's going on.

     

    Are you quite certain that you really link incrementally? There are a lot of reasons why link.exe even with /INCREMENTAL might do a full link. I'd take a look at the ordinary command output - it should tell you whether a full link was performed.

     

    Secondly, /VERBOSE is just that and tells you lot of things link.exe is doing.

     

    -hg

    Friday, June 15, 2007 2:53 PM

All replies

  • Let me just add a few more details.

    I have lots of static library projects compiling native C++. Each library consists of around 20-30 .cpp files. I probably end up linking around 20 libraries.

    Tuesday, June 12, 2007 9:46 PM
  • There was a time in the past when programmers had to wait for periods such as 24 hours to get just a single compile and test. I hope you can reduce the time necessary to relink and such, but 15 minutes would be considered amazing in the recent past.
    Wednesday, June 13, 2007 12:47 AM
  • If I can't get an answer on how to reduce the time can I ask a question how to pinpoint the problem?

    I'd like to know how I can determine what is causing it. If we can re-architect our code to avoid this problem then I'm sure we'd invest the manpower to do it. I just would need to be sure it's a certain area.

    For example, we make heavy use of templates for smart pointers through out the code base. Could it be that all the symbols for each object file are causing the symbol resolution to make the linker take such a long time? If thats a possability how can I peek into linking process to find out?

    Thank you,
    Dave
    Thursday, June 14, 2007 12:47 AM
  • There are the /Bt and /time switches. The may give you a basic idea on what's going on.

     

    Are you quite certain that you really link incrementally? There are a lot of reasons why link.exe even with /INCREMENTAL might do a full link. I'd take a look at the ordinary command output - it should tell you whether a full link was performed.

     

    Secondly, /VERBOSE is just that and tells you lot of things link.exe is doing.

     

    -hg

    Friday, June 15, 2007 2:53 PM