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

Move calculation of size data for string, int, and list types into resolve_types LUA script #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mbafford
Copy link
Contributor

On my test Redis instance (~4 million entries), this resulted in a substantial improvement in run-time, mainly by batching all of the calls into the same block of LUA as the existing resolve_types script.

As point of comparison, this code runs on my current instance in about 5 minutes. I gave up running the unmodified original code after 15 minutes, as the "Processing String patterns" step was only 1% of the way completed.

I did my best to keep the size calculations true to the original code, but I'm not 100% confident I am calculating exactly the same sizes as the original.

@mbafford
Copy link
Contributor Author

I did not change the behavior for hashtable, ziplist, intset - these are all still calculated when the code iterates over the keys instead of in the Lua script.

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

Successfully merging this pull request may close these issues.

1 participant