Delphi: How to organize source code to increase compiler performance?

前端 未结 14 2176
一整个雨季
一整个雨季 2020-12-13 13:14

I\'m working on a large delphi 6 project with quite a lot of dependancies. It takes several minutes to compile the whole project. The recompilation after a few changes is so

14条回答
  •  旧巷少年郎
    2020-12-13 13:52

    The compiler will only compile units that have changed. If you have changed the code in the interface section all units that depend on the changed unit are compiled. If only code in the implementation section is changed, the compile will only that unit but presumably link all the modules. Implies a good design of interfaces up front but if you restructure the code to restrict changes to the implementation compile times might reduce. I have no idea by how much. This fact is mentioned in the Delphi help files under Multiple and indirect unit references in Delphi 7 "Using Delphi".

提交回复
热议问题