6

Well, there is a strange problem occured in my working project. It is written on Delphi. When I try to compile it, it takes 8 hours to compile about 770 000 lines (and it is not the end), while my colleague needs only 15-20 seconds. I've tried everything suggested in Why does Delphi's compilation speed degrade the longer it's open, and what can I do about it?

  1. Shorten the path to project
  2. Defragment disc with MyDefrag
  3. Use Clear Unit Cache (do not sure, if it worked at all)
    I also turned off the optimization and I use debug mode. My PC is pretty fast (i5-2310 3.1 GHz, 16 Gb RAM, usual SATA HDDs), the bottle neck could be the HDD, but my collegue has usual one too. So, it is very mysterious, what is the reason of so slow compilation.

Edit: I apologize for lack of information. Here is additional info:

  1. I use debug mode, release one works same.
  2. We use Delphi XE version.
  3. I've copied my collegue's folder with project initially.
  4. I do not use network drive, and I tried to move project to another HDD.
  5. Additional info about system: I use Windows 7 Enterprise N 64 bit, while my collegue uses Windows 7 32 bit, Also, Delphi XE is 32-bit (dunno, if it can be 64-bit). May be it is the reason in some way?

Edit 2: I found solution! The problem was that I installed Delphi on my Windows 64 bit system. Installing it on virtual Windows 7 x86 made it work: compiling in seconds. Dunno, why is there so big gap in perfomance.

Community
  • 1
  • 1
Serge Mosin
  • 397
  • 1
  • 6
  • 15
  • 1
    You've said *I use debug mode*. Did you mean you used debug build configuration ? If so, then try to use the release one. But it's just a wild guess, I can't see your build configurations. Anyway, in your question is missing what version of Delphi are you using and how your build configuration exactly looks like. So this question just tended me to guess. – TLama Aug 05 '12 at 03:52
  • 2
    I have several Delphi projects that are 1M+ lines of source, and none of them takes more than a minute tops (for a build all). My suggestion? Back up your project, delete it, and install from your colleague's copy; if that doesn't work, you've broken something in your Delphi configuration, and you should probably reinstall. One thought, though: are any of your source files on a network path? If so, move them to your local drive, change search/library paths to the new location, and see if that fixes it. – Ken White Aug 05 '12 at 03:59
  • 1
    Do you have global IDE search or browsing paths configured which are on a network drive? – mjn Aug 05 '12 at 06:12
  • actually, your PC is not pretty fast, but super fast, I also experienced something similar to this, but just a small hack helped me to over come this issue, but still i don't know why it happened, just removing the dproj file(let thr IDE to regenerate one) helped me – Vibeeshan Mahadeva Aug 05 '12 at 06:29
  • You may get some indication of the problem area by turning on 'show compile progress' ad take a look at the unit names as they run. – Brian Frost Aug 05 '12 at 07:18
  • 7
    I saw this happen once too. My project compiled in 2 seconds for me and about 30 seconds for my colleague. Turned out to be his anti-virus program. We removed and reinstalled his anti-virus and his machine started to compile as quickly as mine. – James L. Aug 05 '12 at 07:50
  • Sounds like the compilation just hung rather than was slow. – David Heffernan Aug 05 '12 at 09:07
  • Added info to the post. And btw, TLama, what exactly info do you need from my build configuration? – Serge Mosin Aug 06 '12 at 05:06
  • Had a similar problem. not 8 hours to compile, but 2-3 min... I turned off the anti-virus and index server and it complied normally... – kobik Aug 30 '12 at 16:18
  • Your edit2 is not an answer, while it might seem to be the solution. I have Delphi 2007 and XE2 both running on Win7 64-bit, and they both run fine. I work regularly on a project that's 1 million plus lines of code without any issues. – Ken White Aug 30 '12 at 17:16
  • The problem with this project, I think, was that it was initially written on 32 bit system and all the libraries it uses are 32-bit also. – Serge Mosin Jan 04 '13 at 09:30

1 Answers1

2

Are you sure this is not some hardware problem, e.g. your hard disk having a bad sector? Try to put the source code on a different disk and see if the problem goes away. Or maybe the search path points to a network drive that is very slow or not even available?

dummzeuch
  • 10,975
  • 4
  • 51
  • 158