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

HMSET performance #2

Open
elbrujohalcon opened this issue Dec 19, 2011 · 1 comment
Open

HMSET performance #2

elbrujohalcon opened this issue Dec 19, 2011 · 1 comment

Comments

@elbrujohalcon
Copy link
Collaborator

HMSET performance is awful. That's because we're simply looping through the values and executing a HSET for each one. We should find a way to set all values in a single pass.

@ghost ghost assigned cbd Dec 19, 2011
@cbd
Copy link
Owner

cbd commented Mar 6, 2012

Brujo - I looked into this today, the problem is that we're using a dict and unless we crack the internals of the record format, which for posterity looks like this:

#dict{size = 0,n = 16,maxn = 16,bso = 8,exp_size = 80,
      con_size = 48,
      empty = {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
      segs = {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}}

We're going to have to keep the foldl in edis_db.erl - my thought is that possibly we could use a nif and replace the dict with uthash - then we could modify the structures in memory. I think we should think about this one some more first.

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