Board index » cppbuilder » C++ Builder 2006 very slow compilation

C++ Builder 2006 very slow compilation


2006-03-13 02:35:31 PM
cppbuilder12
We are currently using BCB5 for our VCL project development.
I have downloaded BDS 2006 Architect Trial and have ported a largish
project (>200 cpp files/forms) to it. I like the new IDE and all the
nice little enhancements that comes with it but I was very surprised to
see that the compilation times are extremely slow.
It took 550 seconds to build my project with BDS compared to 120 seconds
it takes with BCB5. I have the pre-compiled header enabled, and all
other projects options are the same.
Is there anything I can do make it compile faster? I would accept 20-40%
slower compilation times but BDS is almost 500% slower which is
unacceptable.
Peter
 
 

Re:C++ Builder 2006 very slow compilation

There is some comments regarding compiler performance for both delphi
and BCB with large projects where all files are read-only.
Try to build after you remove read-only flag for all files in your project.
blogs.borland.com/stevet/archive/2006/02/27/23540.aspx
Doychin
Peter Gasparik wrote:
Quote
We are currently using BCB5 for our VCL project development.

I have downloaded BDS 2006 Architect Trial and have ported a largish
project (>200 cpp files/forms) to it. I like the new IDE and all the
nice little enhancements that comes with it but I was very surprised to
see that the compilation times are extremely slow.

It took 550 seconds to build my project with BDS compared to 120 seconds
it takes with BCB5. I have the pre-compiled header enabled, and all
other projects options are the same.

Is there anything I can do make it compile faster? I would accept 20-40%
slower compilation times but BDS is almost 500% slower which is
unacceptable.

Peter
 

Re:C++ Builder 2006 very slow compilation

Yes, I read about the read-only flag. All files in my project are
read-write so this should not be an issue.
Peter
Doychin Bondzhev wrote:
Quote
There is some comments regarding compiler performance for both delphi
and BCB with large projects where all files are read-only.

Try to build after you remove read-only flag for all files in your project.

blogs.borland.com/stevet/archive/2006/02/27/23540.aspx

Doychin

 

{smallsort}

Re:C++ Builder 2006 very slow compilation

Doychin Bondzhev wrote:
Quote
There is some comments regarding compiler performance for both delphi
and BCB with large projects where all files are read-only.

Try to build after you remove read-only flag for all files in your project.

blogs.borland.com/stevet/archive/2006/02/27/23540.aspx

Doychin

Peter Gasparik wrote:

>We are currently using BCB5 for our VCL project development.
>
>I have downloaded BDS 2006 Architect Trial and have ported a largish
>project (>200 cpp files/forms) to it. I like the new IDE and all the
>nice little enhancements that comes with it but I was very surprised
>to see that the compilation times are extremely slow.
>
>It took 550 seconds to build my project with BDS compared to 120
>seconds it takes with BCB5. I have the pre-compiled header enabled,
>and all other projects options are the same.
>
>Is there anything I can do make it compile faster? I would accept
>20-40% slower compilation times but BDS is almost 500% slower which is
>unacceptable.
>
>Peter
Peter,
I suggest to try Andreas Hausladen bcc32pch package. The compile time
will boost at least 2~4 times faster. I don't know if it is available
for BCB5 but it is okey for BDS2006.
unvclx.sf.net/downloads/bcc32pch26InstallDev7.zip
Sabetay
 

Re:C++ Builder 2006 very slow compilation

Thanks for the tip. I didn't know there is such plugin for BDS.
I've installed it and it works - kind off.
The compile time of the main project went down from 550 seconds to just
65 - excellent!
However, I'm having problems to build one of the lib projects I have.
Project compiles fine but at the end I get this error:
'Error: opening 'Files\Borland\BDS\4.0\Bin\tlib.exe @HSSTAT~1.@@@'
Looks like 'c:\Program Files' is incorrectly inserted.
Also it doesn't seem to be able to install any of my bpl packages. It
just displays 'There are errors' in compile window. No reason given.
Peter
Sabetay Toros wrote:
Quote
Peter,

I suggest to try Andreas Hausladen bcc32pch package. The compile time
will boost at least 2~4 times faster. I don't know if it is available
for BCB5 but it is okey for BDS2006.

unvclx.sf.net/downloads/bcc32pch26InstallDev7.zip

Sabetay
 

Re:C++ Builder 2006 very slow compilation

Peter Gasparik wrote:
Quote
Thanks for the tip. I didn't know there is such plugin for BDS.
I've installed it and it works - kind off.
The compile time of the main project went down from 550 seconds to just
65 - excellent!

However, I'm having problems to build one of the lib projects I have.
Project compiles fine but at the end I get this error:
'Error: opening 'Files\Borland\BDS\4.0\Bin\tlib.exe @HSSTAT~1.@@@'
Looks like 'c:\Program Files' is incorrectly inserted.

Also it doesn't seem to be able to install any of my bpl packages. It
just displays 'There are errors' in compile window. No reason given.

Peter


Sabetay Toros wrote:

>Peter,
>
>I suggest to try Andreas Hausladen bcc32pch package. The compile time
>will boost at least 2~4 times faster. I don't know if it is available
>for BCB5 but it is okey for BDS2006.
>
>unvclx.sf.net/downloads/bcc32pch26InstallDev7.zip
>
>Sabetay
Peter,
Could you run your programs before installing the plugin? If the issue
comes from the plugin Andreas will help you.
Sabetay
 

Re:C++ Builder 2006 very slow compilation

Sabetay Toros ha scritto:
Quote

I suggest to try Andreas Hausladen bcc32pch package. The compile time
will boost at least 2~4 times faster. I don't know if it is available
for BCB5 but it is okey for BDS2006.

unvclx.sf.net/downloads/bcc32pch26InstallDev7.zip

Sabetay
Andreas Hausladen bcc32pch package is available and it is okey for BCB5.
The last version is in:
unvclx.sourceforge.net/downloads/bcc32pch26InstallDev7.zip
Can You try it in BCB5, and write in this forum the time of compiling
the same project in BCB5 with pcc32pch?
Thank You
Carmelo Viavattene
 

Re:C++ Builder 2006 very slow compilation

Peter Gasparik wrote:
Quote
However, I'm having problems to build one of the lib projects I have.
Project compiles fine but at the end I get this error: 'Error: opening
'Files\Borland\BDS\4.0\Bin\tlib.exe @HSSTAT~1.@@@' Looks like
'c:\Program Files' is incorrectly inserted.
I don't know where this error comes from.
If you use the "ProjectMaker" maketool this code is used:
CreateProcess(nil, PChar(QuotedFilename(App) + ' ' + Args), ...);
function QuoteFilename(const Filename: string): string;
begin
if Pos(' ', Filename)>0 then // contains \0x20
Result := '"' + Dequote(Filename) + '"' // quote it
else
Result := Filename; // leave it as it is
end;
And if you use the "Borland MAKE" maketool this code is used:
Lines.Add(#9'$(BCB)\BIN\$(LINKER) /u "$@" @&&|');
So I don't see where the quotes get lost.
Could you export a bcc32pch Makefile (menu Project/Export bcc32pch
Makefile) of that project and have a look at the command line of the
"$(PROJECT):" target where "$(BCB)\BIN\$(LINKER)" is used. Furthermore can
you post the "LFLAGS =" line.
Quote
Also it doesn't seem to be able to install any of my bpl packages. It
just displays 'There are errors' in compile window. No reason given.
There is currently a problem with BPL which are used by the IDE.
BCB/Delphi/BDS calls a function namend UnloadForCompilation or so. But
that function needs some parameters that I don't know where to get. I also
tried to simply call UnloadPackage and after the compilation LoadPackage,
but the IDE manages the designtime packages itself in an extra list that I
cannot access.
But I'm still trying to fix this bug. And if I do not find a solution for
this, I will simple use the speedfixed internal Compiler for packages. At
the moment you must unload the designtime packages by hand that require
the package you want to compile.
--
Regards,
Andreas Hausladen
 

Re:C++ Builder 2006 very slow compilation

In article <441518fb$ XXXX@XXXXX.COM >,
Doychin Bondzhev < XXXX@XXXXX.COM >wrote:
Quote
There is some comments regarding compiler performance for both delphi
and BCB with large projects where all files are read-only.

Try to build after you remove read-only flag for all files in your project.
This is also in QC:
<qc.borland.com/wc/qcmain.aspx>
--
-David
Nihil curo de ista tua stulta superstitione.
 

Re:C++ Builder 2006 very slow compilation

Andreas Hausladen wrote:
Quote
Could you export a bcc32pch Makefile (menu Project/Export bcc32pch
Makefile) of that project and have a look at the command line of the
"$(PROJECT):" target where "$(BCB)\BIN\$(LINKER)" is used. Furthermore can
you post the "LFLAGS =" line.
Here are $(PROJECT) and $(LFLAGS) lines from the makefile:
LFLAGS = /P512 /C
$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE)
$(BCB)\BIN\$(LINKER) /u "$@" @&&|
$(LFLAGS) -+"$(OBJOUTDIR)\HsStaticLib.obj" &
-+"$(OBJOUTDIR)\Address.obj" &
-+"$(OBJOUTDIR)\Client.obj" &
...
When I run the generated makefile using "make -f mylib.mak" from the
command line everything compiles fine and the lib is created.
Quote
But I'm still trying to fix this bug. And if I do not find a solution for
this, I will simple use the speedfixed internal Compiler for packages. At
the moment you must unload the designtime packages by hand that require
the package you want to compile.
The packages I use are quite small and it wouldn't bother me if the
internal compiler is used for that. Perhaps a check box in the
preferences screen could be used to specify internal/external
compilation for the packages.
I have also noticed that if I select Build project the pre-compiled
headers are not rebuilt. I have to manually delete pre-compiled header
files to have them rebuilt.
Peter
 

Re:C++ Builder 2006 very slow compilation

Carmelo Viavattene wrote:
Quote
Can You try it in BCB5, and write in this forum the time of compiling
the same project in BCB5 with pcc32pch?

To compile the same project (~400 files) in BCB5 takes about 26 seconds
(without linking). In BDS 2006 compilation took 40-45 seconds and with
linking 55-65 seconds.
The BCB5 project didn't link as linker for trying to link some files
that weren't part of the project: program.obj, lib.obj.
Also some other BCB5 projects didn't build, complaining that it can't
open NDEBUG.cpp. Obviously some error during makefile conversion.
 

Re:C++ Builder 2006 very slow compilation

Peter Gasparik wrote:
Quote
When I run the generated makefile using "make -f mylib.mak" from the
command line everything compiles fine and the lib is created.
That's because then the $(MAKE) macro is used for BCB=$(MAKE)\.. and
$(MAKE) is always a short path. But when you start it from the IDE, BCB
will define the environment variable BCB with a long file name, that
contains spaces.
Quote
I have also noticed that if I select Build project the pre-compiled
headers are not rebuilt. I have to manually delete pre-compiled header
files to have them rebuilt.
That's because bcc32ide.exe does a dependency check on the dependency
files and tests if the commandd line options have changed (both
information is stored into the .obj file).
--
Regards,
Andreas Hausladen
 

Re:C++ Builder 2006 very slow compilation

"Peter Gasparik" < XXXX@XXXXX.COM >wrote in message
Quote
Thanks for the tip. I didn't know there is such plugin for BDS.
I've installed it and it works - kind off.
The compile time of the main project went down from 550 seconds to just
65 - excellent!
Peter,
Try just the "BCB IDE Compiler SpeedFix" instead - it's not *quite* as
blazingly fast as the other tool, but I've found it very stable for all my
projects.
andy.jgknet.de/cpp/forum/viewtopic.php
- Roddy
 

Re:C++ Builder 2006 very slow compilation

I tried the SpeedFix 1.3.1 and spped improvement is quite significant
with BCB5. Compile time (400 file project) went down from 120 seconds to
just 35.
However, on BDS2006 the speed wasn't improved that significantly - it
went from 550 seconds to about 300.
I'm hoping that bcc32pch patch will improve so I could use it for
building all projects. For pbl projects I wouldn't mind if it uses
SpeedFix and external compiler for other packages.
Peter
Roddy Pratt wrote:
Quote
Peter,

Try just the "BCB IDE Compiler SpeedFix" instead - it's not *quite* as
blazingly fast as the other tool, but I've found it very stable for all my
projects.

andy.jgknet.de/cpp/forum/viewtopic.php

- Roddy
 

Re:C++ Builder 2006 very slow compilation

Peter Gasparik wrote:
Quote
Is there anything I can do make it compile faster?
I'm nearly ready to release my TwineCompiler product, my multi-threading C++
compiler wrapper. Basically it wraps the Borland C++ compiler so that you
can use multi-chip/core machines to greatly decrease compile times.
I know that there are many people on these groups that will attest to
TwineCompiler's immense capability.
This release will also include a IDE plugin, so that you don't have to
fiddle with makefiles to perform a multi-threading compile.
Jonatha