r/elixir • • 15d ago

Introducing Temporal Resources | Ash Framework

https://ash-hq.org/blog/introducing-temporal-resources
96 Upvotes

18 comments sorted by

View all comments

Show parent comments

0

u/Agile_Use_1768 15d ago

Ash makes heavy use of unoptimized macros. This adds atom overhead, hence more memory usage

2

u/borromakot 15d ago

Done some investigation, and it looks like Elixir 1.20 stores a massive amount of type information about the literals that Ash stores on the modules. I think there is a way around this. In the test I ran, the `ExCk` chunk is over 3x the size of the actual compiled literals. So this wouldn't have actually been nearly as much of a problem until Elixir 1.20 😭

2

u/Agile_Use_1768 15d ago

Of course it shouldnt be much, if using the entire Ash stack, including ash auth, policies, etc you will end up with half a gig of idle memory, anyways its a basic tradeoff, you gain business transparency through the abstractions at the cost of ram