My company has been running a large project on Delphi for more than a decade. Our codebase has been growing over the years and now stands at around 4 million lines of code. Comp
Did you try to compile the code using a script command line?
Did recompiling from command line made the process stand on 40 seconds?
run from cmd "dcc32.exe" to see usage.
Update: I can't check it now, however you should try compiling from command line and see if you try to run from the ide, the ide should not recompile, and lets you run with debug.