| View previous topic :: View next topic |
| Author |
Message |
Vinson Guest
|
Posted: Fri Mar 25, 2005 3:01 am Post subject: Speed up BCB Compilation |
|
|
How do I make BCB's code completion and compilation faster? The compiler is
compiling million of lines of code in my project although I have less than
10K lines of code. My problem is with the sometime long delay in Code
Completion.
I remember there's a trick to delete some files in the BCB directory but I
can't find it on the web anymore. All solutions welcome!
|
|
| Back to top |
|
 |
Alisdair Meredith Guest
|
Posted: Fri Mar 25, 2005 7:57 am Post subject: Re: Speed up BCB Compilation |
|
|
Vinson wrote:
| Quote: | I remember there's a trick to delete some files in the BCB directory
but I can't find it on the web anymore. All solutions welcome!
|
The trick you are referring to is to delete all the .hdp files.
Apparently these were an attempt at automatically making precompiled
headers for small projects that quickly turn into a slow-down as the
project grows.
The other important thing to do is to optimise your precompiled
headers. For precompiled headers to work well, you need to include
EXACTLY the same sequence of headers before the #pragma hdrstop in
EXACTLY the same order, in EVERY file in the project. I do this by
creating a specific header file for each project that includes all the
headers I want precompiling, and use that as the ONLY header before the
#pragma. I also set each project up with its own precompiled header
file in the project options.
Both of these help, but I find code insight/completion are still very
slow in BCB. The various technology demonstrations that have been seen
for BCB in Delphi2005 (at Borcon and BDNTV) show that this should be
considerable faster in the next release - although we still have no
idea how long that wait will be.
AlisdairM(TeamB)
|
|
| Back to top |
|
 |
Vinson Guest
|
Posted: Sun Mar 27, 2005 2:57 pm Post subject: Re: Speed up BCB Compilation |
|
|
I modify the settings and sources according to your suggestion and those on
the web, and experienced near instant speed with CodeInsight (<1secs). I can
feel that the compilation was a bit faster too but I didn't had a baseline.
The only problem are sources with a Form which takes 4-5 secs to bubble the
CodeInsight. I had a feeling that it is parsing the headers each time as the
CPU is 100% for full 5 secs.
"Alisdair Meredith"
wrote in message news:4243c47e$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Vinson wrote:
I remember there's a trick to delete some files in the BCB directory
but I can't find it on the web anymore. All solutions welcome!
The trick you are referring to is to delete all the .hdp files.
Apparently these were an attempt at automatically making precompiled
headers for small projects that quickly turn into a slow-down as the
project grows.
The other important thing to do is to optimise your precompiled
headers. For precompiled headers to work well, you need to include
EXACTLY the same sequence of headers before the #pragma hdrstop in
EXACTLY the same order, in EVERY file in the project. I do this by
creating a specific header file for each project that includes all the
headers I want precompiling, and use that as the ONLY header before the
#pragma. I also set each project up with its own precompiled header
file in the project options.
Both of these help, but I find code insight/completion are still very
slow in BCB. The various technology demonstrations that have been seen
for BCB in Delphi2005 (at Borcon and BDNTV) show that this should be
considerable faster in the next release - although we still have no
idea how long that wait will be.
AlisdairM(TeamB)
|
|
|
| Back to top |
|
 |
Vladimir Stefanovic Guest
|
Posted: Sun Mar 27, 2005 3:58 pm Post subject: Re: Speed up BCB Compilation |
|
|
| Quote: | Both of these help, but I find code insight/completion are
still very slow in BCB.
|
Before I got a new PC (AMD64, 3400+, MSI K8N Neo),
I disabled all CodeInsight features, because it was attacking my
nervs because of slow-downs and BCB hangs-up.
Now, Code Insight works OK, and I haven't disabled it (yet).
--
Best regards,
Vladimir Stefanovic
|
|
| Back to top |
|
 |
Andrue Cope [TeamB] Guest
|
Posted: Wed Mar 30, 2005 8:13 am Post subject: Re: Speed up BCB Compilation |
|
|
Yakov,
Could you trim your quoting please? We don't need the entire message to
be reposted under your two line response. Thank you.
--
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html
|
|
| Back to top |
|
 |
tinyabs Guest
|
Posted: Wed Mar 30, 2005 3:20 pm Post subject: Re: Speed up BCB Compilation |
|
|
I don't see the problem.
"Andrue Cope [TeamB]" <no.spam (AT) not (DOT) a.valid.address> wrote
|
|
| Back to top |
|
 |
Andrue Cope [TeamB] Guest
|
Posted: Wed Mar 30, 2005 4:01 pm Post subject: Re: Speed up BCB Compilation |
|
|
tinyabs wrote:
| Quote: | I don't see the problem.
|
You might be using a newsreader that automatically surpresses
signatures. If all you can see is Yakov's reply then you are.
Unfortunately underneath his signature he has a copy of the original
message with the addition of '>' characters at the start of every line.
The problem with this is that 90% of Yakov's reply is a copy of text
that is freely available on the newserver in its original form should
anyone need to review it. The result is that the original message is
being stored on the server twice (which wastes disk space) and perhaps
more importantly has been transmitted twice as many times as was needed
thus wasting bandwidth.
Borland operate this newserver and they have guidelines
(http://info.borland.com/newsgroups/guide.html if you can't see my
signature). These ask that users keep quoting to a minimum and I as a
member of TeamB am a moderator and I try to ensure people keep to
Borland's rules :)
--
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html
|
|
| Back to top |
|
 |
Yakov Becker Guest
|
Posted: Thu Mar 31, 2005 12:09 pm Post subject: Re: Speed up BCB Compilation |
|
|
Sorry for including original e-mail text in my response.
Can you explain why compiling from the command line 10 times faster than
from IDE?
Thanks,
Yakov Becker
|
|
| Back to top |
|
 |
tinyabs Guest
|
Posted: Thu Mar 31, 2005 12:52 pm Post subject: Re: Speed up BCB Compilation |
|
|
Perhaps without the IDE, it has more memory to work with; no memory
swapping.
|
|
| Back to top |
|
 |
Andrue Cope [TeamB] Guest
|
Posted: Thu Mar 31, 2005 1:27 pm Post subject: Re: Speed up BCB Compilation |
|
|
Yakov Becker wrote:
| Quote: | Can you explain why compiling from the command line 10 times faster
than from IDE?
|
Sorry but I find it a bit of a mystery as well :)
I've been told that it's mainly due to memory usage but I find this
puzzling. I can't immediately see any reason for the memory usage to be
significantly different just because the compiler is being called from
the IDE.
I can run the command line compiler from a separate console when one or
more IDEs are open and it runs at the same lightning fast speed.
Perhaps there's an overhead in the compiler communicating progress
information back to the IDE but that is even more hard to believe. I've
done that kind of thing myself and the performance reduction is
negligable.
--
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html
|
|
| Back to top |
|
 |
Alex Bakaev [TeamB] Guest
|
Posted: Thu Mar 31, 2005 5:33 pm Post subject: Re: Speed up BCB Compilation |
|
|
Andrue Cope [TeamB] wrote:
| Quote: | Yakov Becker wrote:
Can you explain why compiling from the command line 10 times faster
than from IDE?
Sorry but I find it a bit of a mystery as well :)
|
The IDE is playing tricks with the #include headers - it's substituting
them to have optimal precomp headers. And we know that there are some
problems with precomp headers...
..a
|
|
| Back to top |
|
 |
Des O'Toole Guest
|
Posted: Thu Mar 31, 2005 6:17 pm Post subject: Re: Speed up BCB Compilation |
|
|
"Yakov Becker" <yasha (AT) strategyrunner (DOT) com> wrote
| Quote: | Sorry for including original e-mail text in my response.
Can you explain why compiling from the command line 10 times faster than
from IDE?
|
I would strongly suspect a bug, which only becomes noticable with large
projects.
I looked into this some years ago (see http://tinyurl.com/3fqlq for some
findings). I don't know if this is still the same problem, but I would
suspect that it is. Makefiles seem to be the only solution for large
projects.
Des
|
|
| Back to top |
|
 |
Andrue Cope [TeamB] Guest
|
Posted: Fri Apr 01, 2005 8:01 am Post subject: Re: Speed up BCB Compilation |
|
|
Alex Bakaev [TeamB] wrote:
| Quote: | The IDE is playing tricks with the #include headers - it's
substituting them to have optimal precomp headers. And we know that
there are some problems with precomp headers...
|
But I deleted my HDP files. Or do you mean something else?
--
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html
|
|
| Back to top |
|
 |
tinyabs Guest
|
Posted: Fri Apr 01, 2005 3:50 pm Post subject: Re: Speed up BCB Compilation |
|
|
Here are some idea to share.
I removed most of the packages in "Install Packages" section, leaving only
some JVCL and BCB standards design packages. CodeInsight now takes a maximum
of 3 seconds now, down from 5 secs. The memory usage is 50-70MB, down from
70-80MB.
However, the compilation time didn't not changed much. I tuned the disk
cache and only got 2 secs off it.
Yeah, my problem solved.
|
|
| Back to top |
|
 |
Alex Bakaev [TeamB] Guest
|
Posted: Fri Apr 01, 2005 5:19 pm Post subject: Re: Speed up BCB Compilation |
|
|
Andrue Cope [TeamB] wrote:
| Quote: | Alex Bakaev [TeamB] wrote:
The IDE is playing tricks with the #include headers - it's
substituting them to have optimal precomp headers. And we know that
there are some problems with precomp headers...
But I deleted my HDP files. Or do you mean something else?
|
That's mostly what I meant. But if there is a 10x difference between IDE
and command-line compilations, something must be wrong...
..a
|
|
| Back to top |
|
 |
|