[erlang-questions] Dialyzer startup time

Kostis Sagonas <>
Mon Jun 21 09:02:57 CEST 2010


Bernard Duggan wrote:
> Hi list,
>     When running dialyzer, the first thing it always does is the 
> "Compiling some key modules to native code" step.

Well, this is not done always. This step is performed only if you are 
about to dialyze more than a certain number of files (20, I believe) 
which in turn typically results in considerably faster analysis time.
You can bypass this step by using the --no_native (-nn) option.

> Am I right in 
> thinking that this phase involves just compiling some actual 
> dialyzer-related code (rather than the code I'm trying to analyze)?

Yes.

> If so, surely it isn't necessary to redo this every run given that those 
> files won't have changed (unless I actually upgrade my Erlang install).  
> Is there a way to cache the compilation results or something so that 
> this step (a bit under half the total "dialyzing" time) can be avoided?  
> If not, what would it take to add such a system?

There is a way to do this, though not in the way you suggest. I have to 
warn you that, even though I am using it in my system for more that a 
year now, I am not sure of its status in Erlang/OTP R14A.

If you are interested, give it a try and I'll help you get it working. 
Starting from a clean system, there is a configure option:

	--enable-native-libs

which you should use at configuration time. Needless to mention, hipe 
should also be enabled. Then issue a 'make'. Let us know how it works.

Cheers,
Kostis


More information about the erlang-questions mailing list