473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

VS.NET Compiler performance

Is there a reason for (and hopefully a work-around to) the
VC++.NET's compiler "flushing" each output file to disk before compiling
the next one? I've noticed this in both the 2002 and 2003 releases.

The application in question is a normal unmanaged C++ MFC
application migrated from VC++ 6. There are many files in the project
(250-300+) but the majority are fairly small...

Unlike VC++6, it appears that the new compiler will only
start compiling the next file once the current file's output is
completely written to disk. I know this because

(a) the hard-disk is going crazy and
(b) the CPU is idling around 20% on average.

With VC++ 6 the CPU sat at basically 100% and
the disk light flashed now-and-then as the OS flushed lazily in the
background.

And it also appears to get slower and slower the further
into the compile (the CPU usage drops). It now takes about 3 times as
long to do a full compile as it did before...

A RAM disk definitely helps a lot but the one I have is 32MB
max and not enough to fit all of the files generated (upward of
70-80MB). Currently I can only fit the .OBJ files there, leaving .PCH,
..SBR etc. files on the disk.

However I cannot see I should need to go to this extreme!!

Any help/suggestions welcome!

Nov 16 '05 #1
3 3118

Other things to check:

Try disabling /YX (automatic pre-compiled headers).

Check your build dependancies to see if you have a project-to-project dependancy. Sometimes projects imported from vc6
will be given dependancies that will cause the other project to be rebuilt for each file.

Eric Christoffersen
Microsoft Visual C++
Nov 16 '05 #2
> What OS are you using?
Windows 2000 Server SP3 with VS.NET 2003

How much memory do you have? 512MB, of which typically at least half is available...

Is /GL (whole program optimization) enabled? No, this is a debug build but it's the same with a release build and
then yes, it's presumably on.

Could you please share your project's compiler and linker command-line
options?
compiler:

/Od /G7 /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /FD /EHsc /MTd
/Yu"stdafx.h"
/Fp".\Debug/css.pch" /Fo"q:\css\Debug/" /Fd".\Debug/" /FR".\Debug/"
/W3 /nologo /c
/ZI /Gz /TP

(NB: drive Q: is the ramdisk, but as I mentioned it's not large enough
to fit all of the files on)
linker:

/OUT:".\Debug/css.exe" /INCREMENTAL /NOLOGO /DELAYLOAD:"OleAcc.dll"
/DEBUG /PDB:".\Debug/css.pdb" /SUBSYSTEM:WINDOWS /MACHINE:X86
ltkrn_n.lib ltfil_n.lib ltdis_n.lib ltimg_n.lib rpcrt4.lib mpr.lib
odbc32.lib DelayImp.lib
\Dev\Sites\src\t2bill\Debug\t2bill.lib DelayImp.lib
Other things to check:

Try disabling /YX (automatic pre-compiled headers). PCH is created explicitly not automatically (see command-line above)

Check your build dependancies to see if you have a project-to-project
dependancy. Sometimes projects imported from vc6 will be given
dependancies that will cause the other project to be rebuilt for each
file.

Not quite sure what you mean; the dependancies look OK. But I think I
would have noticed this happening.......??

It's definitely looking as if it's doing a full flush-file-to-disk
after each output file is written.

Nov 16 '05 #3

--------------------
From: Martin <Ma****@com.com>
Newsgroups: microsoft.public.dotnet.languages.vc
Subject: Re: VS.NET Compiler performance
Date: Wed, 27 Aug 2003 12:45:56 +0200
Organization: The South African Internet Exchange
Lines: 54
Message-ID: <bi**********@ctb-nnrp2.saix.net>
References: <bi**********@ctb-nnrp2.saix.net> <MP**************@cpmsftngxa06.phx.gbl>
<fR**************@cpmsftngxa06.phx.gbl>NNTP-Posting-Host: 196.25.64.218
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: ctb-nnrp2.saix.net 1061981081 3452 196.25.64.218 (27 Aug 2003 10:44:41 GMT)X-Complaints-To: ab***@saix.net
NNTP-Posting-Date: 27 Aug 2003 10:44:41 GMT
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)X-Accept-Language: en-us, en
In-Reply-To: <fR**************@cpmsftngxa06.phx.gbl>
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFT NGXA05.phx.gbl!TK2MSFTNGP0
8.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!newsfeed.icl.net!newsfeed.f
jserv.net!proxad.net!peer1.news.newnet.co.uk!peer1 .news.newnet.co.uk!zen.net
.uk!btnet-peer1!btnet-peer0!btnet!ctb-nntp1.saix.net!not-for-mailXref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vc:27620
X-Tomcat-NG: microsoft.public.dotnet.languages.vc
What OS are you using?

Windows 2000 Server SP3 with VS.NET 2003

How much memory do you have?

512MB, of which typically at least half is available...

Is /GL (whole program optimization) enabled?

No, this is a debug build but it's the same with a release build and
then yes, it's presumably on.

Could you please share your project's compiler and linker command-line
options?


compiler:

/Od /G7 /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /FD /EHsc /MTd
/Yu"stdafx.h"
/Fp".\Debug/css.pch" /Fo"q:\css\Debug/" /Fd".\Debug/" /FR".\Debug/"
/W3 /nologo /c
/ZI /Gz /TP

(NB: drive Q: is the ramdisk, but as I mentioned it's not large enough
to fit all of the files on)
linker:

/OUT:".\Debug/css.exe" /INCREMENTAL /NOLOGO /DELAYLOAD:"OleAcc.dll"
/DEBUG /PDB:".\Debug/css.pdb" /SUBSYSTEM:WINDOWS /MACHINE:X86
ltkrn_n.lib ltfil_n.lib ltdis_n.lib ltimg_n.lib rpcrt4.lib mpr.lib
odbc32.lib DelayImp.lib
\Dev\Sites\src\t2bill\Debug\t2bill.lib DelayImp.lib
Other things to check:

Try disabling /YX (automatic pre-compiled headers).

PCH is created explicitly not automatically (see command-line above)

Check your build dependancies to see if you have a project-to-project
dependancy. Sometimes projects imported from vc6 will be given
dependancies that will cause the other project to be rebuilt for each
file.

Not quite sure what you mean; the dependancies look OK. But I think I
would have noticed this happening.......??

It's definitely looking as if it's doing a full flush-file-to-disk
after each output file is written.


Martin,

Try this: go to Control Panel. Open up System Properties and set memory
usage in the performance options to be for optimized for "System Cache"
rather than "Programs".

Also, run the disk defragmenter on your disk. If your disk is fragmented
badly, PCHs can be fragmented and ruin performance.

--
Tanveer Gani, Microsoft Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: rhmd | last post by:
Just found Python and I love it. What an elegant language! I would like to use it for various applications, but the mathematical calculations are way too slow (a million sines 8 seconds in Python...
13
by: Bryan Parkoff | last post by:
You may notice that switch (...) is much faster than function that can gain a big improved performance because it only use JMP instruction however function is required to use CALL, PUSH, and POP...
233
by: E. Robert Tisdale | last post by:
I have access to a wide variety of different platforms here at JPL and they all have pretty good C 99 compilers. Some people claim that they have not moved to the new standard because of the...
15
by: Mike Lansdaal | last post by:
I came across a reference on a web site (http://www.personalmicrocosms.com/html/dotnettips.html#richtextbox_lines ) that said to speed up access to a rich text box's lines that you needed to use a...
9
by: Olaf Baeyens | last post by:
I am trying to understand the IL assembler created by C# but as far as I can see, there is no optimizing done by the C# compiler. Optimizing is done by the JIT, but it can only go so far. In C++...
44
by: Don Kim | last post by:
Ok, so I posted a rant earlier about the lack of marketing for C++/CLI, and it forked over into another rant about which was the faster compiler. Some said C# was just as fast as C++/CLI, whereas...
2
by: Michael Hudson | last post by:
The PyPy development team has been busy working and we've now packaged our latest improvements, completed work and new experiments as version 0.9.0, our fourth public release. The highlights of...
2
by: lxrocks | last post by:
I am looking for comparitive performance information for C-Compilers. More especially in the area of Float/Integer computes. Any information would be appreciated. tks
3
by: =?Utf-8?B?Y2FzaGRlc2ttYWM=?= | last post by:
Hi, I have built an application containing a few projects (nothing that I have written)and there are a few compiler warnings (obsolete methods and the like). Does anyone know if these obsolete...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.