Rich_Morin
I’ve been adding and refining specs on my (12 KLOC Elixir) project. This is an iterative process, so I run Dialyzer a lot. Even after the PLT has been built, each run takes several seconds. I’d like to know if there is anything I can do to speed this up.
I’m currently running Dialyzer on a MacBook Air (1.8 GHz Intel Core i7, 4 GB RAM, dual core, 1 TB SSD, …) Would it run faster on a machine with more cores or RAM? Any other suggestions?
-r
Trending in Questions
I’m aware of 2 such projects, are there others?
git: GitHub - team-alembic/realworld: A fullstack Phoenix LiveView application with back...
New
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Hi everyone.
My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
Hello folks!
So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
How Can I Optimise Compile Time Dependencies
I have been building an elixir application for about 2 years now. Many modules and files ha...
New
Other Trending Topics
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
rodrigues
Hi @Rich_Morin, do you specify a
plt_add_depsoption?By defining it as
:apps_direct, you can restrict manually the app tree, and the whole process could be a bit faster (not only making the plt, but running dialyzer after it too).Rich_Morin
Good suggestion; I’ll try that out. The documentation lists several options, but I’m not sure about their implications:
mix app.tree(default)Comments and/or explanations would be appreciated!
Rich_Morin
I tried adding
plt_add_deps: :apps_direct. This caused the PLT to be rebuilt, taking about 20 minutes. After that, I found that Dialyzer took about 10 seconds per run (down from 12). However, it now issues quite a few complaints about not being able to find information onPlug....I assume that I can get rid of these by adding more options, but at 20 minutes per experiment, this isn’t my idea of fun. Can anyone suggest a set of options that Just Works for a typical Phoenix project?
dimitarvp
I found the default to never error (in terms of not being able to find modules).
This likely isn’t the answer you are after but MacBook Airs are quite weak and sadly 10-12 secs per Dialyzer run is pretty normal. My MBP 2015 checks ~400 files in 6-7 seconds.
Rich_Morin
Thanks for the feedback and data point. I also have a 2010 Mac Pro (12 cores, 3.4 GHz, oodles of RAM), so I plan to try running on that. I’d love to know whether Dialyzer takes advantage of multiple cores; can someone point me to any information on that?
dimitarvp
AFAIK anything that uses OTP makes use of multicore implicitly. I’ll be very interested in your Mac Pro 2010 datapoint btw; I am still torn between buying a refurbished (but maxed) Mac Pro 5,1 2012 or go all in with an iMac Pro 2017. I am very curious how well does the parallel compilation do with those old-ish Xeon CPUs.
Rich_Morin
I’m sure Dialyzer gets some implicit multicore benefits in terms of IO and such, but unless its analysis is split up into multiple actors, only one core can be working on it at a time.
FWIW, I’m quite happy with the Mac Pro 5,1. I particularly like the ability to add disks, graphics cards, memory, etc. I’ll post my timing results RSN…
NobbZ
It tries to as best as it can, but some tasks are basically not parallelizable.
rodrigues
With
:apps_directmode, you’d need to add some apps manually through the optionplt_add_apps, in my case for a phoenix app I do:I got there by having failures such as the one you’ve had with
Plug. It took me some time, but, by doing that, I remember having reduced quite a bit the plt cache building time, and also the running time, compared to before.Don’t have the measures anymore though.EDIT:
Just ran it in a project both options to compare, both phases are indeed faster, but it’s the PLT caching that gets more impact comparing to default:
Rich_Morin
I finally got around to running Dialyzer on my 2010 Mac Pro. It takes about six seconds, as compared to the 10-12 it takes on my MB Air.