[erlang-questions] How to compile faster ?

zxq9 <>
Wed May 18 09:45:01 CEST 2016


On Wednesday 18 May 2016 15:10:22 Zhongzheng Liu wrote:
> Thank you O'Keefe.
> 
> I use make:file/2 in my script, it is faster if hrl file is not change.
> But the checking process is also not very fast.
> 
> But all module share a same hrl, a slight change in hrl will cause all
> modules recompile, even most modules did not cite the changed part.
> 
> Can it be more faster?

Probably only possible if you can re-structure the project to avoid having
a hrl that is both huge *and* universal across the entire project -- which
you already said is not possible (which I interpret to mean is something
out of your control or would be more of a pain than just suffering through
long build times).

On that note, a project I'm working on right now has slowly worked its
way out of a similar case of multiply-nested records living in a huge,
universal hrl import. Now we have small ADTs and modules that generally
correspond either strictly to to process definitions or *_lib.erl files.
...and life is much better. If you can possibly move in that direction
you will probably enjoy your time more (and find that both development
and building gets faster).

Good luck!

-Craig


More information about the erlang-questions mailing list