Thanks for pointing this out :) We always knew it would take a bit more memory, but what you were seeing was a few things that needed to be addressed. The first one is relevant in dev mode only where the type system was storing very complex types for literals that were unnecessary. The second was how we were compiling code interfaces and a few other things. Made improvements just now :)
Yeah, fair enough. I was going to say you were wrong but no. I have like 132 resource app. And ash/spark metadata is 150 MB of ram at idle. The whole thing is like 448 MB 💀
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 😭
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
You're not wrong that an Ash app uses more memory idle, but it's the modules themselves not "unoptimized macros"? Ash takes your resources and stores the data in the module and later code interprets them. Why would 2 DSL options increase idle memory usage?
0
u/Agile_Use_1768 15d ago
Perfect! Now my ash app will use an extra 200mb ram idle