views:

783

answers:

9

My project has around 400 units, it takes 20-40secs to compile after a fresh reboot, then than 1-5secs for sub-sequent re-compiles, so far so good.

After working for over 3-6 hours, compiling takes 1-3mins for sub-sequent re-compiles, which forces me to reboot everytime.

Is there a leak somewhere in D7? Is it problem of Windows XP? It's getting very frustrating...

Anybody encountered this problem?

Edit1 DelphiSpeedup doesn't seem to improve the problem, it still occurs....

+1  A: 

Our biggest Delphi app does take awhile to compile, but I haven't noticed it taking longer for subsequent re-compiles.

Here is one person's solution, but it sounds like a shot in the dark: http://groups.google.com/group/borland.public.delphi.ide.general/msg/9b8150342943e5d2

Nelson
+6  A: 

Older versions of Delphi have known performance problems compiling in the IDE (as compared to the command line), including lots of unnecessary file access.

Delphi Speedup fixes some problems in the IDE, including improvements for compiling, linking and Map file creation. It might help in your situation.

Bruce McGee
A: 

When Delphi compilation starts to slow down, take a look at the memory usage. In general, some stuff inside the IDE leaks (my personal favorite culprits are find-in-files and coderush search), and after a couple of hours of working, you just might end up with a enough memory allocated to really start slowin things down.

Paul-Jan
A: 

This question is similar to that one. Avoiding circular references would help a lot. DelphiSpeedUp, as stated above, also helps.

Fabricio Araujo
A: 

Wow, Delphi SpeedUp is quite impressive, test result:

Complete build of project:

Before: 1min15sec

After: 45sec

Compile project (no changes to source, simply opened the project and compile)

Before: 1min

After: 20sec

Robo
A: 

If the problem still persists after installing DelphiSpeedup, try removing any third party IDE plugins and see if that helps.

You could also check to see if any of your library paths either don't exist or are on mapped/network drives. These will slow down compiling, but I'm not sure if they cause it to get slower over time.

Bruce McGee
A: 

I've noticed this too and it seems to be directly related to the number of Exceptions you get when you close Delphi. I don't generally need to reboot the computer to get back up to speed.

My advice would be to go into the the Environment Options and turn on the Autosave options so that you can restart Delphi and not take a million years to find what you had open. I have to do this because my debugger only seems to work for about an hour.

Peter Turner
A: 

Turning off compiler hints and messages increases the speed significantly.

Project > Options Compiler Messages Uncheck "show hints" and "show messages".

+1  A: 

I've found that optimizing the uses clause of units helps with compilation speeds. Where possible, remove references to units in particular cases where, for example, unit1 uses unit2 in it's interface section and unit2 uses unit1 in it's implementation section.

There is a good free uses clause analyzer that points out unneeded uses references at http://www.peganza.com/products_icarus.htm.

Alan Clark