Closed toraritte closed 4 years ago
It is simply because of performance. Application environment is backed by an ETS table while persistent term is optimized for reading, so it makes sense to use in cases where the value should never be changed but needs to be dynamic at runtime.
From
sds_storage.erl
:I couldn't figure out why this is necessary (or more beneficial) instead of just putting
Does it have to do with this being an umbrella project? Is it because of convenience because
application:get_env/2
returns a tuple?Thank you so much by the way for putting together all these amazing online materials and libs! Fiddled with Erlang and Elixir for years, but this time I have a serious project going into production, and putting the pieces together without Adopting Erlang (to just name one work) would have taken exponentially longer. Again, your efforts are deeply appreciated!