Replies: 1 comment 2 replies
-
The view is only kept as a name/alias, there is no function call on the view module so there shouldn't be any compile time dependency. Have you done any in-depth profiling & comparison? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a few files are having their own module for sending out emails(modular structure)
All of those files contain
Before removing
use Phoenix.Swoosh
, it would takechung@debian:$ time mix compile Compiling 33 files (.ex) real 0m8.528s user 0m19.535s sys 0m0.990s
after removing
use Phoenix.Swoosh
chung@debian:$ time mix compile Compiling 24 files (.ex) real 0m8.206s user 0m16.695s sys 0m0.888s
it would reduce the compile time by 1-2 seconds.
I tried to resort to
put_layout/2
andput_view/2
. However,use Phoenix.Swoosh
requires a view to be defined, souse Phoenix.Swoosh, view: HelloWordWeb.EmailView
is the minimal requirement. With this change combined withput_layout
, surprisingly the compile time didn't make a difference at all.Beta Was this translation helpful? Give feedback.
All reactions