Closed liamwhite closed 4 years ago
This is much improved in Elixir v1.11, which no longer treats imports as compile-time dependencies. Since v1.11 will be out soon, I propose to keep things as is, thanks! :)
Okay, good to know!
Confirming that this is fixed in 1.11.
Importing the UserAuth module into the router in development causes very minor changes to the application to end up recompiling the router. This is very slow.
Performance after
touch lib/philomena/users.ex
:A small set of changes causes development recompilation performance to return to normal:
The added plugs simply call the relevant function in the UserAuth module.
Performance after
touch lib/philomena/users.ex
:I've already confirmed that the problem only occurs because the router is recompiled, and recompiling the router alone is quite slow: