lgp
Elixir and Mac OS - anyone noticed a drop in performance?
Has anyone else noticed a sharp drop in Elixir performance on MacOS over the past couple of years? The problem really seems to be in startup time rather than actual execution time. I don’t remember the Elixir version or the MacOS version where it started, but I kept expecting the next update of one or the other to fix it, but it hasn’t. I’m now on MacOS Catalina and Elixir 1.9.2.
Here are some comparison startup times:
larry@habu ~ % time erl -noshell -eval 'erlang:display(erlang:system_info(system_version))' -eval 'init:stop()'"Erlang/OTP 22 [erts-10.5.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe] [dtrace]\n"
erl -noshell -eval 'erlang:display(erlang:system_info(system_version))' -eval 0.20s user 0.07s system 8% cpu 3.045 total
larry@habu ~ % time perl --version This is perl 5, version 18, subversion 4 (v5.18.4) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)
Copyright 1987-2013, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
perl --version 0.00s user 0.00s system 56% cpu 0.012 total
larry@habu ~ % time ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
ruby --version 0.01s user 0.01s system 74% cpu 0.019 total
larry@habu ~ % time python --version
Python 3.5.1
python --version 0.01s user 0.01s system 66% cpu 0.024 total
larry@habu ~ % time ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.6.3
ghc --version 0.03s user 0.03s system 65% cpu 0.097 total
larry@habu ~ % time elixir --version
Erlang/OTP 22 [erts-10.5.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe] [dtrace]
Elixir 1.9.2 (compiled with Erlang/OTP 22)
elixir --version 0.18s user 0.10s system 4% cpu 6.180 total
larry@habu ~ % time erl -noshell -eval 'erlang:display(erlang:system_info(system_version))' -eval 'init:stop()'
"Erlang/OTP 22 [erts-10.5.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe] [dtrace]\n"
erl -noshell -eval 'erlang:display(erlang:system_info(system_version))' -eval 0.19s user 0.06s system 9% cpu 2.723 total
Any thoughts?
Most Liked
lgp
Alles: FWIW, the problem has gone away. Just as I didn’t know when it started, I don’t know when it ended. But I (for some forgotten reason) ran the “time elixir…” thing today and it responded immediately.
So I went to my Mac (I originally ran it remotely from my iPad) and started actually doing some stuff, and the problem did not appear.
I checked one of the other two Macs which had the problem and it is gone there as well. I don’t know whether it was fixed by a recent OS patch or whether some other app was interfering and has since been upgraded and that fixed the problem.
In any case, I’m back in the elixir business for now.
tme_317
I would try installing Erlang and Elixir using asdf as a previous commenter said. By doing that you could install older versions of Erlang and Elixir and switch between them to compare and see any differences.
I’ve noticed compile performance has improved in recent versions.
Performance is good on Mojave 10.14 with a slightly older Erlang (22.0.7) than you are using:
➜ ~ time elixir --version
Erlang/OTP 22 [erts-10.4.4] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]
Elixir 1.9.2 (compiled with Erlang/OTP 22)
elixir --version 0.46s user 0.31s system 147% cpu 0.516 total
ityonemo
gremlins.
axelson
elixir --version taking 6 seconds does seem excessively long. Do you have anything in a .iex.exs file?
lgp
OK. I haven’t solved the problem, but I’ve isolated it.
I have a FireWire connected disk with a clean Mojave installation on it, set up with the idea of keeping some 32-bit games around. I booted from it, installed homebrew — which took forever — and the. Installed Elixir 1.9.2. No problem.
So the problem is with something on the other boot disks. All I have to do is figure out which files in that couple (or four) terabytes is causing the problem.







