lgp
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?
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
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
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
christhekeele
Anecdotally, I haven’t noticed this over the years. There is a whole VM and OTP application tree being booted, so some of these comparisons aren’t the best. Booting Clojure on the Java VM might be a more equitable comparison, but I don’t have an install handy to test. If memory serves, it takes a little over half a second.
dimitarvp
I actively use macOS for little more than a year now and got through 2 major macOS updates but no, I definitely haven’t noticed any startup performance degradation at all.
axelson
elixir --versiontaking 6 seconds does seem excessively long. Do you have anything in a.iex.exsfile?lgp
Aha! I did have a .iex.exs file!
But after I removed it, the same thing happened.
FWIW, the behavior is the same on three different iMacs in the house. Although my home directory files are similar on all three, the startup time for Elixir is also the same for a “test” user who has essentially nothing in the way of configuration files:
larry@habu ~ % su - test
Password:
The default interactive shell is now zsh.
To update your account to use zsh, please run
chsh -s /bin/zsh.For more details, please visit Use zsh as the default shell on Mac - Apple Support.
habu:~ test$ ls -a
. .firefoxcatche Downloads Pictures
.. .ssh Library Public
.CFUserTextEncoding Desktop Movies dir.dir
.bash_history Documents Music
habu:~ test$ 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)
real 0m4.670s
user 0m0.159s
sys 0m0.086s
habu:~ test$
outlog
maybe a mac os catalina (10.15) issue? mine is fine on mac os 10.14..
how did you install erlang/elixir? and have you tried reinstalling/upgrading to latest erlang?
lgp
It’s been happening through several MacOS upgrades, and through several Elixir upgrades/reinstalls as well. I don’t remember exactly when it started but it was more than a year ago and less than three years ago.
outlog
definitely not normal - are the imacs harddisk based? maybe it’s IO limited (I’m on ssd as are most others I assume)
how do you install again? I would recommend asdf package manager..
also make sure you mac os dev tools are up to date - usually
xcode-select --installlgp
Two of the iMacs have fusion drives, one is hard disk based. Don’t seem to have IO problems with any of the other langs.
My current installation is with “brew”. I had an older installation with “port” but had some issues with it and have been on the brew install since before the problem started. I’m in the process of doing a port install to see if that makes any difference. If that’s the same I’ll try an installation from source.
lgp
FWIW, the brew install is 1.9.2, the port install will be 1.9.0.
dimitarvp
Pretty broad statement.
Maybe the BEAM runtime loads a lot of files at the bootstrap – no idea. But if so, mixed / pure HDD drives could be a problem.