thiagomajesk

thiagomajesk

Hello everyone! I’ve been working on a hobby project recently and was trying to find content on how to make Elixir code more performant… I’ve been working on this RSS feed parser: GitHub - thiagomajesk/gluttony: Compliant elixir RSS 2.0 and Atom 1.0 parser · GitHub that is based on Saxy and was wondering how much faster I could make this code without recurring to external aid (without using NIFs). From the initial benchmarks that I did, the code is already very fast compared to other alternatives (mostly because of the difference in performance from the underlying parser). So, I basically want to see how much overhead I can take off of my custom processing logic to make it as fast as it can naturally be¹…

Do you guys have any tips, tricks, tools, or materials that would be interesting to share?

¹This is more of a learning experience that an actual necessity. I’m fairly happy with the current performance of the program but I think it would be interesting to have a little bit more knowledge on the subject if I happen to need some time in the future.

PS.: Any considerations on how the code is shaping up to be are welcome as well (I don’t know a lot of experienced people that work with Elixir to review this so…)

Showing Posts 1 to 5

gregvaughn

gregvaughn

I have not personally dug into this library, but the Jason library was written with the intention of higher performance than other json parsing libraries at the time. I’m sure there’s great techniques to mine from that codebase, and it’s also a parser, so it’s conceptually similar to your RSS parser.

thiagomajesk

thiagomajesk OP

Cool @gregvaughn! Even though I’m not trying to change the parser’s code, do you remember any particular scenario that caught your attention for me to look into?

darnahsan

darnahsan

this is not available on hex, would you publishing it ?

thiagomajesk

thiagomajesk OP

I intend to when it’s ready (you can get it from the repo if you want to try it out btw).

kip

kip

ex_cldr Core Team

The most common optimisation I’ve seen applied applications like parsing is to focus on sub binary optimisation. There erlang documentation has quite a good write up on this too.

The basic idea being to avoid copying binaries and to reuse references. Might not be applicable in your case since its likely Saxy is doing the raw parsing?

— All posts loaded —

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
RemyXRenard
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
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
samoloth
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

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews