qdate
qdate copied to clipboard
Feat/persistent term settings
Move the config/settings into persistent terms rather than use application env.
Purely for performance as application:get_env
requires an ETS lookup where persistent_term is highly optimized for reads
@choptastic Would you be ok with my moving the ets/process dictionary settings to persistent terms?
Persistent term performance should be close to process dictionary and would allow for quite a bit of simplification of how settings are handled within qdate.
This is actually very interesting. I totally missed the introduction of the persistent_term
module. Very nice!
BTW, I see you marked this PR as a draft. I just want to check to make sure: is there anything else you'd like to add or change before I merge it in?
@choptastic I marked as a draft since if you were ok with me converting the existing qdate_srv ets/p-dict to persistent terms I'd rework things to move all these changes into that module
Ah yes, that makes sense. Yes, I like the plan of replacing all the ets
calls with the persistent_terms
. But the stuff that is actually using the process dictionary, that needs to remain as-is. The purpose for using the pdict for those functions is not performance, but for those specific settings to persist throughout that process.