I dug up a little inside the conf module code and appears to me that each get/read function call uses the fs readFileSync
to get the data from the config file.
If I need to constantly check for a value from the app settings it can lead to performance issues. So my approach is to copy the settings to a global variable π and only use this module to write the config file when some changes occur.
Are any alternative approach to this problem or do you plan to add a feature to kinda "cache the values" and only reads the file when there are some changes?
Thank you
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too