Community
cancel
Showing results for 
Search instead for 
Did you mean: 
aurora
Beginner
108 Views

Linking faster

Jump to solution
Hi,
I've searched some tips to make the Composer linking faster. Compiling is obviously influenced by optimizations, but I don't know what makes the compiler slower at linking time.
I have some dynamic linking times of 1 min, that it's too much if you are changing only 1 file at the each time.
Is that normal?
Thanks in advance!
0 Kudos
1 Solution
Hubert_H_Intel
Employee
108 Views

Just an addition for tests with disablingIPO (/Qipo-) to see if this helps. Please add also LINKER option /qnoipo (Configuration Properties > Linker > Optimization [Intel C++] > Interprocedural Optimization: No (/qnoipo). The compiler option alone does not always disable interprocedural optimization.

Let me know if this makes any difference.

Regards,
Hubert

View solution in original post

9 Replies
Hubert_H_Intel
Employee
108 Views
Jaime,
Are you running Visual Studio? Are you sure that it's just a matter of linking rather than a complete rebuild of all project files in caseonly one single file was being changed?
Regards, Hubert
ILevi1
Valued Contributor I
108 Views
If a single file is part of a library which is part of a larger project all other files depending on the library need to be rebuilt. Also, make sure you are using precompiled headers.
aurora
Beginner
108 Views
Yes, I know it, but it takes 1 minute (compiling with 8gb in a Xeon with 8 cores) only linking without taking into account the compilation time. I dont use precompiled headers.
Thanks!
ILevi1
Valued Contributor I
108 Views
As I said, consider using precompiled headers. You can also experiment with Link Time Code Generation (/LTCG). Also, if you are using /Qipo, that can slow down linking as well, try switching to /Qip and compare code performance. If /Qip does not reduce performance consider using /Qip instead of /Qipo.

Finally, try using faster storage like 10k RPM HDD or SSD or setup your build environment to work in ram disk.
aurora
Beginner
108 Views
Using/Qipo- doesn't decrease link time. In fact, it takes the same time in debug and in release.

Which things in the code make the linker to be very slow? It happens in only very concrete modules
PS: I can't manage to create/use precompiled headers
Hubert_H_Intel
Employee
109 Views

Just an addition for tests with disablingIPO (/Qipo-) to see if this helps. Please add also LINKER option /qnoipo (Configuration Properties > Linker > Optimization [Intel C++] > Interprocedural Optimization: No (/qnoipo). The compiler option alone does not always disable interprocedural optimization.

Let me know if this makes any difference.

Regards,
Hubert

View solution in original post

SergeyKostrov
Valued Contributor II
108 Views
>>...Is that normal?..

Could you post all Linker options? It is really hard to suggest anything in your case.

Ihad even longer times when some import & dynamic libraries werelocated on a network drive. Another
case was related toa poor performance of aSubversion.
ILevi1
Valued Contributor I
108 Views
Few generic ideas:

- if you are using antivirus, try to temporarily disable realtime scanning and see whether that helps
- if you are connected to VPN try disconnecting before you build

Finally, if you cannot bother to test with precompiled headers to see whether it gets any faster, then I am afraid we cannot offer more help than we already did.
aurora
Beginner
108 Views
#9 That helped. Linking time reduced a 95%! Now I have normal times!
Thanks a lot
Reply