.getAll is kinda slow. how can I speed it up?
MarlonCopeland opened this issue · 1 comments
I set my path to be a separate folder that will only hold my app's json values. But when trying to pull all the values (which is only 1) it takes like 5 seconds.. can you help me speed this up?
Hey @MarlonCopeland ,
That's very weird! What OS are you running this on? Do you have a small reproducible example I can try from my side? This module uses fs
under the hood, which should be very fast. The only reason for the slow down that I can think of is that electron-json-storage
might be retrying multiple times to obtain the lock. Maybe try attaching a debugger, stepping through the code, and see if you hit the retry logic from the lockfile
module (a dependency of electron-json-storage
)?
Let me know what you found. I might be able to help more given more info!