freiden

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

OvermindDL1

OvermindDL1

Well that really should be updated, erlang-19 had a lot of features and bug fixes, however that is likely not the issue. :slight_smile:

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

michalmuskala

That might be very well true :sweat_smile:

Where Next?

Popular in Discussions Top

blackode
Elixir Upgrading is so Simple in Ubuntu and It worked for me Ubuntu 16.04 git clone https://github.com/elixir-lang/elixir.git cd elixir...
New
arcanemachine
https://nitter.net/josevalim/status/1744395345872683471 https://twitter.com/josevalim/status/1744395345872683471
New
lucaong
Hello Elixir and Nerves community, I have been working for a while on an open-source embedded key-value database for Elixir, that I call...
230 13924 124
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39297 209
New
Crowdhailer
I’ve been hearing much about the new formatter and it’s something I have been keen to try. I find examples buy far the most illuminating...
248 19204 150
New
New
und0ck3d
Hello everyone! A few days ago I’ve created a topic here about how people were creating CMSs with Elixir and Phoenix. I’ve been studying...
New
acrolink
How does the two languages compare when it comes to server side application development? Any experiences or ideas? Thank you.
New
scouten
I’m looking for a host for the server part of a small (personal) side project that I’m working on. It’s currently written in Node.js and ...
New
griffinbyatt
Sobelow Sobelow is a security-focused static analysis tool for the Phoenix framework. For security researchers, it is a useful tool for g...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31142 143
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New

We're in Beta

About us Mission Statement