 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Nikos Bakolas Guest
|
Posted: Wed May 03, 2006 10:03 pm Post subject: Very long build times |
|
|
Hi,
I work for a company which develops a medium sized application in
Delphi 2006. At the early stages of development compilation was
extremely quick, usually taking less than a minute for a full build
(100,000 lines of code) on a 512MB Pentium 4 at 2.0GHz. However the last
two years, we are experiencing insufferably long build times. The build
process takes more than 17 minutes to compile 420,000 lines of code
distributed among 340 units. This is on a high-end machine (1GB dual
core AMD 4400+).
By observing the compiler progress dialog, I've noticed the following
things:
1. The first 10 seconds the compiler speeds through the first 100,000
lines of code.
2. During the next 15 minutes it slowly makes its way through the
next 100,000 lines of code. In this stage, the field 'Current line'
never prints a value higher than 100, perhaps indicating that the
compiler is trying to resolve interface references.
3. After line 230,000 the build process speeds up and finishes
building in just under 30 seconds.
What I am interested in knowing is has anybody experienced anything
similar? What are your build times?
Thanks,
Nikos Bakolas |
|
| Back to top |
|
 |
Andreas Hausladen Guest
|
|
| Back to top |
|
 |
Nikos Bakolas Guest
|
Posted: Wed May 03, 2006 11:14 pm Post subject: Re: Very long build times |
|
|
Roddy Pratt wrote:
| Quote: | "Nikos Bakolas" <nospam_nikos_nospam (AT) anadelta_nospam (DOT) com> wrote in message
news:44591f88$1 (AT) newsgroups (DOT) borland.com...
The build process takes more than 17 minutes to compile 420,000 lines of
code distributed among 340 units. This is on a high-end machine (1GB dual
core AMD 4400+).
a: Install update #2 if you haven't already. It fixes a bug with slooow
builds if you have any read-only files in your project.
b: Double the RAM! 1GB does not qualify as a high-end machine any more ;(
- Roddy
|
There are no read-only files, also I have installed Update #2, and
furthermore this problem occured also when we were using Delphi 6.
About the RAM... I watched the Bds.exe memory consumption (from the task
manager) and it was always low, no more than 200MB, so I'm assuming
that's not the problem.
Thanks,
Nikos. |
|
| Back to top |
|
 |
Roddy Pratt Guest
|
Posted: Wed May 03, 2006 11:14 pm Post subject: Re: Very long build times |
|
|
"Nikos Bakolas" <nospam_nikos_nospam (AT) anadelta_nospam (DOT) com> wrote in message
news:44591f88$1 (AT) newsgroups (DOT) borland.com...
| Quote: | The build process takes more than 17 minutes to compile 420,000 lines of
code distributed among 340 units. This is on a high-end machine (1GB dual
core AMD 4400+).
|
a: Install update #2 if you haven't already. It fixes a bug with slooow
builds if you have any read-only files in your project.
b: Double the RAM! 1GB does not qualify as a high-end machine any more ;(
- Roddy |
|
| Back to top |
|
 |
Alistair Ward Guest
|
Posted: Thu May 04, 2006 12:14 am Post subject: Re: Very long build times |
|
|
Hi,
This is a known problem with the Delphi compiler.
I have been experiencing this for a while, and eventually got to the point
of shipping our entire code base to Borland for them to look at.
In our case our build times had extended out to 25minutes, but a relatively
simple reorganization of the code dropped the build time back to about 2.5
minutes (which we still thing is too slow!).
The problem is basically that the compiler processes units in a recursive
manner, and if a unit has not been compiled *completely* in one go, the next
time it is encountered, the compiler processes that unit again *from
scratch*!!!!!!!!!!!!
I have been told that borland are working on a new unit compiler engine that
should address this, but not idea of time frame.
This information is based on conversations with Borland a couple of months
ago.
In our case, we had a main class (lets call it TMain, in unit Main.pas...),
which holds everything else in our system. Main.pas has just about every
unit in the project in its interface uses clause. In turn, just about every
unit in the project has Main in its implementation uses clause.
We had been noticing our compile times slowing down as the project grew, but
it was gradual. When our build times got to around 7 minutes we suddenly
stopped and went hunting for the cause. Using our Version Control System, we
worked backwards, day by day looking for a checkin that caused a noticable
increase in build times. We eventually found a big slowdown when a unit had
been changed to use Main in its implementation section.
Our reorganization was to create a new class TMainAbstract, in
MainAbstract.pas, which was basically everything that used to be in TMain.
Main.pas then became:
------------
unit Main
interface
uses
MainAbstract;
type
TMain = class( TMainAbstract )
end;
implementation
end.
------------
For our project, this change has given us a 10x improvement in build times.
I hope this information is helpful to you, and I hope that Borland will have
this issue sorted out for the next version of Delphi (we're using Delphi 7,
and have found that the build times have only got worse with D2005 and
D2006).
Cheers,
Alistair Ward.
"Nikos Bakolas" <nospam_nikos_nospam (AT) anadelta_nospam (DOT) com> wrote in message
news:44591f88$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi,
I work for a company which develops a medium sized application in Delphi
2006. At the early stages of development compilation was extremely quick,
usually taking less than a minute for a full build (100,000 lines of code)
on a 512MB Pentium 4 at 2.0GHz. However the last two years, we are
experiencing insufferably long build times. The build process takes more
than 17 minutes to compile 420,000 lines of code distributed among 340
units. This is on a high-end machine (1GB dual core AMD 4400+).
By observing the compiler progress dialog, I've noticed the following
things:
1. The first 10 seconds the compiler speeds through the first 100,000
lines of code.
2. During the next 15 minutes it slowly makes its way through the next
100,000 lines of code. In this stage, the field 'Current line' never
prints a value higher than 100, perhaps indicating that the compiler is
trying to resolve interface references.
3. After line 230,000 the build process speeds up and finishes building
in just under 30 seconds.
What I am interested in knowing is has anybody experienced anything
similar? What are your build times?
Thanks,
Nikos Bakolas |
|
|
| Back to top |
|
 |
Dave Nottage [TeamB] Guest
|
Posted: Thu May 04, 2006 1:14 am Post subject: Re: Very long build times |
|
|
Nikos Bakolas wrote:
| Quote: | There are no read-only files, also I have installed Update #2, and
furthermore this problem occured also when we were using Delphi 6.
|
There was a problem where some actions were slow if you had invalid
paths in the library path, however I thought that had been fixed. It
would be present in Delphi 6, though.
--
Dave Nottage [TeamB]
Have questions?: http://www.catb.org/~esr/faqs/smart-questions.html
Want answers?: http://support.borland.com |
|
| Back to top |
|
 |
Dave Nottage [TeamB] Guest
|
Posted: Thu May 04, 2006 1:14 am Post subject: Re: Very long build times |
|
|
Alistair Ward wrote:
| Quote: | n our case, we had a main class (lets call it TMain, in unit
Main.pas...), which holds everything else in our system. Main.pas has
just about every unit in the project in its interface uses clause. In
turn, just about every unit in the project has Main in its
implementation uses clause.
|
I'm having problems getting my head around why that would be so.
--
Dave Nottage [TeamB]
Have questions?: http://www.catb.org/~esr/faqs/smart-questions.html
Want answers?: http://support.borland.com |
|
| Back to top |
|
 |
samuel herzog Guest
|
Posted: Thu May 04, 2006 6:14 am Post subject: Re: Very long build times |
|
|
also setup the virus scanner to not scan .map .dcu files.
"Nikos Bakolas" <nospam_nikos_nospam (AT) anadelta_nospam (DOT) com> wrote in message
news:44591f88$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi,
I work for a company which develops a medium sized application in
Delphi 2006. At the early stages of development compilation was
extremely quick, usually taking less than a minute for a full build
(100,000 lines of code) on a 512MB Pentium 4 at 2.0GHz. However the last
two years, we are experiencing insufferably long build times. The build
process takes more than 17 minutes to compile 420,000 lines of code
distributed among 340 units. This is on a high-end machine (1GB dual
core AMD 4400+).
By observing the compiler progress dialog, I've noticed the following
things:
1. The first 10 seconds the compiler speeds through the first 100,000
lines of code.
2. During the next 15 minutes it slowly makes its way through the
next 100,000 lines of code. In this stage, the field 'Current line'
never prints a value higher than 100, perhaps indicating that the
compiler is trying to resolve interface references.
3. After line 230,000 the build process speeds up and finishes
building in just under 30 seconds.
What I am interested in knowing is has anybody experienced anything
similar? What are your build times?
Thanks,
Nikos Bakolas |
|
|
| Back to top |
|
 |
Jim Cooper Guest
|
Posted: Thu May 04, 2006 12:15 pm Post subject: Re: Very long build times |
|
|
| Quote: | I'm having problems getting my head around why that would be so.
|
Indeed. I would treat that as a serious organisational problem in the code.
Cheers,
Jim Cooper
_____________________________________________
Jim Cooper jcooper (AT) tabdee (DOT) ltd.uk
Skype : jim.cooper
Tabdee Ltd http://www.tabdee.ltd.uk
TurboSync - Connecting Delphi to your Palm
_____________________________________________ |
|
| Back to top |
|
 |
Nikos Bakolas Guest
|
Posted: Thu May 04, 2006 12:15 pm Post subject: Re: Very long build times |
|
|
Hi,
Thank you for your answer. I think that's our problem too. But it is not
very easy to test it right now, because we have not a single file which
is used everywhere, but a few of them. It will take some time to
restructure our project. When we get around to it I will let you know.
Regards,
Nikos Bakolas.
Alistair Ward wrote:
| Quote: | Hi,
This is a known problem with the Delphi compiler.
I have been experiencing this for a while, and eventually got to the point
of shipping our entire code base to Borland for them to look at.
In our case our build times had extended out to 25minutes, but a relatively
simple reorganization of the code dropped the build time back to about 2.5
minutes (which we still thing is too slow!).
The problem is basically that the compiler processes units in a recursive
manner, and if a unit has not been compiled *completely* in one go, the next
time it is encountered, the compiler processes that unit again *from
scratch*!!!!!!!!!!!!
I have been told that borland are working on a new unit compiler engine that
should address this, but not idea of time frame.
This information is based on conversations with Borland a couple of months
ago.
In our case, we had a main class (lets call it TMain, in unit Main.pas...),
which holds everything else in our system. Main.pas has just about every
unit in the project in its interface uses clause. In turn, just about every
unit in the project has Main in its implementation uses clause.
We had been noticing our compile times slowing down as the project grew, but
it was gradual. When our build times got to around 7 minutes we suddenly
stopped and went hunting for the cause. Using our Version Control System, we
worked backwards, day by day looking for a checkin that caused a noticable
increase in build times. We eventually found a big slowdown when a unit had
been changed to use Main in its implementation section.
Our reorganization was to create a new class TMainAbstract, in
MainAbstract.pas, which was basically everything that used to be in TMain.
Main.pas then became:
------------
unit Main
interface
uses
MainAbstract;
type
TMain = class( TMainAbstract )
end;
implementation
end.
------------
For our project, this change has given us a 10x improvement in build times.
I hope this information is helpful to you, and I hope that Borland will have
this issue sorted out for the next version of Delphi (we're using Delphi 7,
and have found that the build times have only got worse with D2005 and
D2006).
Cheers,
Alistair Ward.
|
|
|
| Back to top |
|
 |
David Novo Guest
|
Posted: Fri May 12, 2006 7:14 am Post subject: Re: Very long build times |
|
|
Hi Alistair,
Your post is a life saver. A complete build for us is 6 hours on our
slowest machine, about 2.5 hours on the fastest. What you describe
makes sense based on what we have seen so far, we will get the same
hint from the same line of code sometimes 10x in the hint window. We
will spend some effort trying to restructure the code to eliminate
these circular type references.
Thanks for the post! |
|
| Back to top |
|
 |
Chris Burrows Guest
|
Posted: Fri May 12, 2006 8:14 am Post subject: Re: Very long build times |
|
|
"David Novo" <dave (AT) xxx (DOT) denovosoftware.com> wrote in message
news:44642d00$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
We will spend some effort trying to restructure the code to eliminate
these circular type references.
|
Peganza's Pascal Analyzer should help reduce your efforts:
http://www.peganza.com
--
Chris Burrows
CFB Software
http://www.cfbsoftware.com |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|