A question I haven't seen answered that I'm finding very interesting. All the other threads seems to discuss forcing the problem, ie switching to dynamic linking or just distributing the workload. I'm more interested in actually finding out what's causing linking to take so long.
The problem is that I don't really see any official ways to get the relevant metrics from the linker, at least not for the VS linker. There's the /verbose switch which will give you a lot of insight into what the linker is doing, but it won't give you any fine grained timings at all.
I've been thinking of running the linker process from a tool which do the actual measurements on a per line basis. While this won't provide accurate timings, it would probably be accurate enough to pinpoint linking bottlenecks.
Anyone know of a better approach, or perhaps even a tool for this task?
Found an excellent article series on this on http://gameangst.com/?p=46 , which goes into rather fine detail on what affects link times. At the end the author also supplies a program that he calls symbol sort ( at http://gameangst.com/?p=320 ). This is the program I was looking for, as it greatly aids in pinpointing where to spend your effort. It doesn't hurt that it took about 10 seconds to get it up and running and working!
Although not directly answering your question:
In VS the linker is also responsible for code generation and global optimization, you may try to disable "Link Time Code Generation" to decrease link time.
EDIT: Thus, due to the global nature of the linker you can't say that linking module X takes 10% of the time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With