You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, in updateMeasurementCount(), we iterate over all measurements using a default scan size, which is ten records. That means about 7k calls just to count the keys. We could use a larger batch size as in store cleanup() but since we don't need the keys at all, just their count, it's still a lot of unnecessary IO. We should replace this with a small lua script, similar to this that just returns the number of matching keys. The redis client has built-in support for script handling: https://github.com/redis/node-redis#lua-scripts
The text was updated successfully, but these errors were encountered:
Right now, in
updateMeasurementCount()
, we iterate over all measurements using a default scan size, which is ten records. That means about 7k calls just to count the keys. We could use a larger batch size as in storecleanup()
but since we don't need the keys at all, just their count, it's still a lot of unnecessary IO. We should replace this with a small lua script, similar to this that just returns the number of matching keys. The redis client has built-in support for script handling: https://github.com/redis/node-redis#lua-scriptsThe text was updated successfully, but these errors were encountered: