New Feature - Read data from the RAM (don't always read the file content)
See original GitHub issueI 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
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:9
Top Results From Across the Web
13. Files — How to Think Like a Computer Scientist
While a program is running, its data is stored in random access memory (RAM). ... By reading and writing files, programs can save...
Read more >How to initialize RAM from file using TEXTIO - VHDLwhiz
First, we need to read the characters one by one from the text_line object, then we decode their values and assign them to...
Read more >How can I read large text files line by line, without loading ...
I want to read a large file (>5GB), line by line, without loading its entire contents into memory. I cannot use readlines() since...
Read more >What is RAM (Random Access Memory)? - TechTarget
RAM is the main memory in a computer. It is much faster to read from and write to than other kinds of storage,...
Read more >Reading file data with PowerShell - SQLShack
The latest version of PowerShell and many earlier versions of PowerShell come with the Get-Content function and it allows us to easy read...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I am currently working on a alternative library to save the settings. Main highlights:
I will post here when I publish the process
@sayem314 It’s only for electron
@papb the electron-store is basically a wrapper of the conf module, so the complaints are the same