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

Hangs if db has too many keys #16

Open
blueberry6401 opened this issue Oct 11, 2021 · 3 comments
Open

Hangs if db has too many keys #16

blueberry6401 opened this issue Oct 11, 2021 · 3 comments

Comments

@blueberry6401
Copy link

My test Redis db has over 7 millions keys. When open, app takes too much time to load and while it's loading, it hangs.
Is it running SCAN? If so, can I set keys limit to load when open app?

@scuml
Copy link
Collaborator

scuml commented Oct 11, 2021

Confirming the problem on my end. I test up to 2.5M keys, and while it should take 10-20 seconds to load that on an M1, it's beachballing right now. I'll check into what's causing the hang up. Thanks for alerting me to the problem.

Handling large databases has been one of the biggest challenges with development. The application runs multiple scan calls and then uses threads to asynchronously create the objects used in the sidebar. After all that is done, a sort operation is run - and this is usually what hangs the system. Another problem can occur after the sort, as Mac OS then has to handle rendering all 7M items in the sidebar.

One optimization the app implements is that is skips sort in subdirectories - so if you organize your data using separated parent:child:key format, the app won't bother sorting those items. Are you using any sort of key format to organize your data? Do you use slashes? Or is it a long flat list?

@blueberry6401
Copy link
Author

Yep I have those keys in parent:child:key format.
I think the basic optimization is limit the key to scan. If keys count exceeds like 100,000 keys, it should stop and show load more. Because most of the time I'll use filter instead of browsing through the sideview.

@scuml
Copy link
Collaborator

scuml commented Nov 6, 2021

This should perform much better with version 1.7.6 - available now on echodot.com/red and tomorrow on the Mac App Store. Still will take a while to load initially, but the hanging behavior should be resolved.

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