Lots of recompilations after modifying files

I am working on a Phoenix application containing more than 400 modules. It is built using the Phoenix 1.2 structure, so all the models are living under the web/models directory.

When modifying a model, this application needs to recompile more than 200 modules. Some of this recompilations, such as the model’s controller, are easily understandable but others don’t seem to make any sense.

I am following the advice of this wonderful article, but I can not make any sense of where the problem is coming from.
Using mix xref graph lists about 5 modules having a compile-time dependency on a certain model. All those compile-time dependencies make perfect sense. The strange thing is, by recursively following the dependencies of those modules I can not find many other modules that are being recompiled.
These modules seem to have a runtime-dependency of the updated model (or its runtime-dependent modules), yet they are recompiled every time.

How can this be possible? Is there any other tool or tip that I may use to untangle this mess?
Thank you very much in advance.


On which system are you working? Are you using some kind of shared or network file system? I’ve heard about similar behaviour when using a vm and a shared folder and times were of by a second.

I am using MacOs native without any virtualisation layer such as Docker nor shared network file systems.

Can you give the compilation list of files that are recompiled along with the xref graph?