Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.getAll is kinda slow. how can I speed it up? #117

Open
MarlonCopeland opened this issue Sep 20, 2018 · 1 comment
Open

.getAll is kinda slow. how can I speed it up? #117

MarlonCopeland opened this issue Sep 20, 2018 · 1 comment

Comments

@MarlonCopeland
Copy link

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?

@jviotti
Copy link
Member

jviotti commented Oct 1, 2018

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants