I am currently working on a Forum/community system in Elixir using Phoenix. First everything was nice, but slowly the compile times increased. It got so bad that now small changes can take up to 30 seconds.
I already read about compile dependencies and stuff, but I can’t really make sense of tools like mix xref. The generated graphic is unusable (image viewers seem not to be able to show the image) and the tree/stats views are confusing to me.
I already tried to fight this problem by stripping out imports and requires, and it made things better – but by far not good.
Can somebody point me to resources explaining how to use tools like mix xref or explain me what I am doing wrong?
Edit: also please don’t mince matters. If you think I am using anti patterns and thus causing this problem myself, tell me. I can handle that and love to learn.
Ah, right - you have to create a appsignal.exs, this file contains secrets and thus is not in the repo. A simple use Mix.Config in this file should be enough.
this is a project with some legacy; if you want to try it out, run mix ecto.load (this loads the database structure from version 4) and then mix migrate.cf4 (this migrates to the v5 structure) – sorry, still a lot of details to work on
Thanks, Jose, for your reply. Sadly this doesn’t change anything. A change on layout/app.html.eex still recompiles 106 files. Same for other files. Compile times are really high in this project, and I can’t wrap my head around this sorry.
I am also struggling from this high compile time. But now a kind of adjusted to this. Tried to reduce the compile time many ways, but nothing came out good.