Why does Delphi's compilation speed degrade the longer it's open, and what can I do about it?

后端 未结 6 1249
南方客
南方客 2021-02-01 14:20

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

6条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-01 15:05

    If you build your application, here are some tricks to speed up the process:

    • Erase all *.dcu before the build (del *.dcu /s);
    • Run a good defragmenter on your corresponding hard drive;
    • Put most of your source files in the same directory, and try to leave the IDE and Project library paths as short as possible, with the most used entries at first;
    • Install DelphiSpeedUp.

    Delphi 2007 should compile faster than Delphi 2006.

    Delphi 2009/2010/XE would probably be slower: from user experiment, the implementation of generics and new RTTI made the compilation process more complex, and the actual implementation was found out to be slower e.g. than with Delphi 2007.

    Update:

    Did you try enabling the ProjectClearUnitCacheItem hidden menu entry?

    Clear Unit Cache entry

    I've this entry enabled either by the CnPack, either by DDevExtension (I don't know which one do this, probably the later). This could be used to clear the internal unit cache.

提交回复
热议问题