473,387 Members | 1,515 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,387 software developers and data experts.

How to speed up C++/CLI build process?

I notice that compiling older C++ program with /clr option needs a lot
of time. Now I have a program below which use mix code feature in C++/CLI:
#include "stdafx.h"
#include "ManagedException.h"
class MixClass
{
....(500 lines MixCode Here)
}
stdafx.h includes many stable header files. MixCode here has 500 lines.
If I change just 1 line in the MixCode, I have to wait a few seconds to
compile it again.
So I want to know if there is some way to speed up this build process?
Thanks!
Jun 16 '07 #1
3 1891

"hesicong" <he**********@163.comwrote in message
news:f5**********@news.cn99.com...
>I notice that compiling older C++ program with /clr option needs a lot of
time. Now I have a program below which use mix code feature in C++/CLI:
#include "stdafx.h"
#include "ManagedException.h"
class MixClass
{
....(500 lines MixCode Here)
}
stdafx.h includes many stable header files. MixCode here has 500 lines. If
I change just 1 line in the MixCode, I have to wait a few seconds to
compile it again.
So I want to know if there is some way to speed up this build process?
Thanks!
Are you using precompiled headers?

And a class with 500 members seems badly oversized. Perhaps you have
function definitions placed inline, java-style, that should be moved to a
separate .cpp file.

Jun 16 '07 #2
"Ben Voigt [C++ MVP]" <rb*@nospam.nospamwrote in message
news:D5**********************************@microsof t.com...
>
"hesicong" <he**********@163.comwrote in message
news:f5**********@news.cn99.com...
>>I notice that compiling older C++ program with /clr option needs a lot of
time. Now I have a program below which use mix code feature in C++/CLI:
#include "stdafx.h"
#include "ManagedException.h"
class MixClass
{
....(500 lines MixCode Here)
}
stdafx.h includes many stable header files. MixCode here has 500 lines.
If I change just 1 line in the MixCode, I have to wait a few seconds to
compile it again.
So I want to know if there is some way to speed up this build process?
Thanks!

Are you using precompiled headers?

And a class with 500 members seems badly oversized. Perhaps you have
function definitions placed inline, java-style, that should be moved to a
separate .cpp file.

Ben, he said lines, not members.

Jun 22 '07 #3

"Rick C" <pi******@hotmailx.comwrote in message
news:D5**********************************@microsof t.com...
"Ben Voigt [C++ MVP]" <rb*@nospam.nospamwrote in message
news:D5**********************************@microsof t.com...
>>
"hesicong" <he**********@163.comwrote in message
news:f5**********@news.cn99.com...
>>>I notice that compiling older C++ program with /clr option needs a lot of
time. Now I have a program below which use mix code feature in C++/CLI:
#include "stdafx.h"
#include "ManagedException.h"
class MixClass
{
....(500 lines MixCode Here)
}
stdafx.h includes many stable header files. MixCode here has 500 lines.
If I change just 1 line in the MixCode, I have to wait a few seconds to
compile it again.
So I want to know if there is some way to speed up this build process?
Thanks!

Are you using precompiled headers?

And a class with 500 members seems badly oversized. Perhaps you have
function definitions placed inline, java-style, that should be moved to a
separate .cpp file.


Ben, he said lines, not members.
C++ class definitions should have (not counting blanks and comments) one
line per member.

Any function body too long to fit on a single line should be defined outside
the class definition. Failing to do this will affect build time, which was
the original complaint. It also causes changes to cause the compiler to
reprocess code that wasn't affected. The only reason to recompile all code
using the header is if the public interface changed. Implementation changes
should only require recompiling the matching .cpp file, not users.

Jun 22 '07 #4

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

Similar topics

34
by: Jacek Generowicz | last post by:
I have a program in which I make very good use of a memoizer: def memoize(callable): cache = {} def proxy(*args): try: return cache except KeyError: return cache.setdefault(args,...
8
by: ted | last post by:
How does the speed of the Scons build tool compare with Ant? Right now with out Ant builds take around an hour. Hoping to speed that up. TIA, Ted
4
by: cameron | last post by:
I have always been under the impression that LDAP was optimized for speed. Fast queries, fast access, slower writes. I have a block of data in LDAP and in SQL. Exact same data. The query is fast...
3
by: Arun Kumar | last post by:
Hi I am new to .NET. I have VS.NET 2003 and VS.NET 2005 Beta 2 Installed on my PC. I created a Windows Application which uses COM object. Its a simple test. When I Build the application on VS...
4
by: ThunderMusic | last post by:
Hi, Is it possible to speed up the build for ASP.NET 2.0 apps? Each time I click build (or play for debug), it takes forever to build.... Is is possible to speed up this process? it was...
5
by: Cylix | last post by:
I have created an VB.Net application, but I found the startup speed is really slow. Once I start the application and I close it and re-open, The speed is much faster, I know that this is common on...
8
by: Alexander Fischer | last post by:
Hello, I am writing a gallery script and use imagecreatefromjpeg and fpassthru to output images without any change to them (i.e., no thumbnail creation etc. - just deliver the image via the php...
13
by: BK | last post by:
Our .Net team has just inherited a junior programmer that we need to get up to speed as quickly as possible. Unfortunately, his skill set is largely Access with some VB6 and ASP classic...
2
by: jphelan | last post by:
Ever since I successfully applied some techniques for increasing the speed of my 17 meg. Application; it has only made me hunger for more. First, let me list what I have done so far: 1. Split...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...

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.