lgp

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

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

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

ityonemo

gremlins.

axelson

axelson

Scenic Core Team

elixir --version taking 6 seconds does seem excessively long. Do you have anything in a .iex.exs file?

lgp

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.

Where Next?

Popular in Questions Top

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
tduccuong
Hi, is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
Exadra37
Sometimes I want to check if the input into a function is not a blank string. My first approach: defmodule Example do def do_stuff(s...
New

Other popular topics Top

dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement