Article ID: 151501 - Last Review: November 17, 2003 - Revision: 2.0

FIX: Linking Large Projects Can Be Very Slow

This article was previously published under Q151501
Expand all | Collapse all

SYMPTOMS

Linking a large project can take significantly longer than expected.

CAUSE

The linker version 5.00.7022 that was shipped with Visual C++ 5.0 does two types of optimizations to decrease the image size and increase the program speed. Transitive COMDAT Elimination(TCE) and Identical COMDAT Folding(ICF). TCE removes unreferenced COMDATs, while ICF folds identical COMDATs into one copy. The linker option for TCE is /OPT:REF and the option for ICF is /OPT:ICF. /OPT:REF, which is the default for the release build, turns on /OPT:ICF by default. Some applications cause ICF to proceed very slowly.

RESOLUTION

Turn off Identical COMDAT folding(ICF) by specifying /OPT:NOICF in your linker options.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in Visual Studio 97 Service Pack 1.

For additional information about the Visual Studio 97 Service Pack 1, please see the following article in the Microsoft Knowledge Base:
170365  (http://support.microsoft.com/kb/170365/EN-US/ ) INFO: Visual Studio 97 Service Packs - What, Where, and Why

APPLIES TO
  • The Linker (LINK.EXE), when used with:
    • Microsoft Visual C++ 5.0 Enterprise Edition
    • Microsoft Visual C++ 5.0 Professional Edition
Keywords: 
kbbug kbfix kbvs97sp1fix KB151501
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
 

Article Translations