freiden
Build speed has increased after adding ecto
I’m building an API with Phoenix and I noticed that the build time of the application has increased a lot. It passed from less than 1mn after adding Ecto to almost 15mn.
There more libraries than in the beginning but is that normal?
Most Liked
hubertlepicki
it may be similar issue @michalmuskala had:
https://twitter.com/michalmuskala/status/809818141098393601
OvermindDL1
Well that really should be updated, erlang-19 had a lot of features and bug fixes, however that is likely not the issue. ![]()
Assuming your erlang is not build in such a way so that it will compile slow then the next #1 cause for slow compilation is a huge dependency graph. You can print out the dependency graph with mix xref graph --format dot to output a standard graphviz dot file if you want to generate an image, or you can use pretty or plain for different text output styles. The more things that depend on something then they all have to be recompiled. If you see one file that a lot of things depend on and you change that file a lot, then all of those dependents will also need recompiling (as well as their dependents and their dependents and so on), if that happens then break up the files more.
You can also try compiling while setting the long-compilation-threshold to something fairly short to see what files are taking a long time to compile, something like mix compile --long-compilation-threshold 1 for any file that takes above 1 second (and work your way up to see less files listed), and you can add --force to recompile your files even if it is not needed if you want to test all.
michalmuskala
That might be very well true ![]()
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








