[erlang-questions] Dialyzer startup time
Bernard Duggan
bernie@REDACTED
Wed Jun 23 06:17:44 CEST 2010
Hi Kostis,
Thanks for the reply.
On 21/06/10 17:02, Kostis Sagonas 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.
>
Sorry, I should have said "when running dialyzer /on our codebase/" :)
You're quite right that the net speedup is still significant - for a
while we were accidentally running a version of Erlang on one machine
that didn't have HiPE compiled in, and the dialyzer run took waaaay longer.
>> 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.
>
Well, I've just tried that - it all compiled and built just fine, but
I'm still getting the "Compiling some key modules to native code" phase,
although now it's taking ~37s rather than ~60s (which I guess is maybe a
function of the compiler itself now using native code?). Was that what
you were expecting, or should that step go away entirely?
Regardless, it's not a huge deal, it just seemed like something that was
taking a while and that might have been easy to speed up - it's not
going to ruin my day if I'm wrong about that :)
Cheers,
Bernard
More information about the erlang-questions
mailing list