🎙️

How We Cut Phoenix Memory from 300MB to 120MB on Embedded

How We Cut Phoenix Memory from 300MB to 120MB on Embedded

At CyanView, we run a Phoenix LiveView application on embedded hardware. Out of the box, the BEAM VM was eating 300MB of RAM at idle and keeping the CPU at 45%. After tuning, we got it down to ~120MB and 5-10% idle CPU.

Here’s exactly what we changed and why each thing matters.

Read more →

Elixir Phoenix Optimisations iPhone Safari

Elixir Phoenix Optimisations iPhone Safari

If you’re running a Phoenix LiveView application and your iOS Safari users are experiencing frozen pages, slow reconnects, or 10+ second hangs after returning from sleep this article is for you.

I’ve been running a production Phoenix LiveView application. The app worked great on desktop, but iPhone users kept reporting the same thing: the page would freeze or hang for several seconds after switching back from another app or unlocking their phone. Sometimes the page would never recover at all.

Read more →

Elixir LiveView Single Binary [UPD]

Elixir LiveView Single Binary [UPD]

We had two repos of Elixir, seventy-five LiveView components, five sheets of high-powered Phoenix channels, a saltshaker half-full of SQLite databases, and a whole multicolored collection of Burrito deployables, Tauri binaries, WebView wrappers, hot-reloaders… Also, a quart of WebSockets, a quart of GenServers, a case of Ecto queries, a pint of raw BEAM bytecode, and two dozen supervisors.

The only thing that really worried me was the WebView. There is nothing in the world more helpless and irresponsible and depraved than a developer in the depths of a cross-platform binge, and I knew we’d get into that rotten stuff pretty soon.

Read more →

Connect Livebook to Phoenix on Vps

Connect Livebook to Phoenix on Vps
Livebook is very powerful application which can be used in many different ways with your Phoneix project. I have few apps running on my VPS and sometimes I would like to run some functions without creating interface for them from admin side, such as cache clean up. Perhaps run some analytical queries to the database and much more.
Read more →

Single File Chat in Elixir Phoenix

Single File Chat in Elixir Phoenix

Meet PhonenixPlayground

I found this library on github suggestions and I always wanted to have something simple and quick to test out LiveView prototypes. What can be quicker than opening Livebook and trying something there? Folks behind PhonenixPlayground made both of my wishes come true!

If you would like jump straight into the code:

Run in Livebook

Read more →