benoitc / erlang-idna

Erlang IDNA lib
MIT License
43 stars 29 forks source link

dialyzer never ends in 1.1.0 #11

Closed andreineculau closed 8 years ago

andreineculau commented 8 years ago

I wanted to upgrade hackney, but then saw that dialyzer never ends. Tracked it down to idna instead

rebar compile
dialyzer --build_plt --apps erts kernel stdlib --output_plt .deps_plt
dialyzer --plt .deps_plt ebin

last step in 1.0.3 takes ~30 seconds, in 1.1.0 ... I killed it after 5 minutes...

benoitc commented 8 years ago

I don't reproduce it there:

[erlang-idna] dialyzer --plt .deps_plt ebin  7:12:53  ☁  compress_beam ☂ ✭
  Checking whether the PLT .deps_plt is up-to-date... yes
  Proceeding with analysis... done in 0m15.38s
done (passed successfully)

But it seems the compressed compile option might be the reason. I will make it optional.

andreineculau commented 8 years ago

confirmed. it's the compressed option.

PS: running OTP 18.2.1 on OSX here, but also experienced on travis with OTP 18.1 https://travis-ci.org/for-GET/katt/jobs/115457898

On Sat, Mar 12, 2016 at 4:21 PM, Benoit Chesneau notifications@github.com wrote:

I don't reproduce it there:

[erlang-idna] dialyzer --plt .deps_plt ebin 7:12:53 ☁ compress_beam ☂ ✭ Checking whether the PLT .deps_plt is up-to-date... yes Proceeding with analysis... done in 0m15.38s done (passed successfully)

But it seems the compressed compile option might be the reason. I will make it optional.

— Reply to this email directly or view it on GitHub https://github.com/benoitc/erlang-idna/issues/11#issuecomment-195760176.

andreineculau.com http://www.andreineculau.com

benoitc commented 8 years ago

@andreineculau it's more likely an issue with the usage of list that is slow. I am thinking to switch to it according #12 but still trying to find an issue that works for all...

benoitc commented 8 years ago

I have released 1.2.0 that uses pattern matching. It fixes the dialyzer error and improve a lot the performances. Build is slower though. The 1.2.0 is compatible with erlang 16 and superior

2.0.0 has also been released using maps. It makes the lookup a bit faster than using pattern matching. In this version the beam size is considerably smaller and it compiles fast. It's tagged 2.0.0 since maps are only available on erlang 18 and superior. Tests also pass.

Enjoy.