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

(#778) perf: add checking and loading scripts uniqueness in pipeline #781

Merged
merged 1 commit into from
Jan 13, 2019

Conversation

akaNightmare
Copy link
Contributor

@akaNightmare akaNightmare changed the title (778) perf: add checking and loading scripts uniqueness in pipeline (#778) perf: add checking and loading scripts uniqueness in pipeline Jan 11, 2019
lib/pipeline.js Outdated
@@ -268,6 +268,8 @@ Pipeline.prototype.exec = function (callback) {

return this.redis.script('exists', scripts.map(function (item) {
return item.sha;
}).filter(function (sha, index, shaList) {
return shaList.indexOf(sha) === index;
})).then(function (results) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scripts.map(function (item) {
    return item.sha;
  }).filter(function (sha, index, shaList) {
    return shaList.indexOf(sha) === index;
  })

Would be better to change to

Array.from(new Set(scripts.map(({sha}) => sha)))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

@@ -12,7 +12,7 @@ describe('pipeline', function () {
[null, 3],
[null, '3']
]);
redis.disconnect()
redis.disconnect();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't add ; here. Code style changes should belong to a separate pull request.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

@luin luin merged commit 66075ba into redis:master Jan 13, 2019
ioredis-robot pushed a commit that referenced this pull request Jan 13, 2019
## [4.5.1](v4.5.0...v4.5.1) (2019-01-13)

### Performance Improvements

* add checking and loading scripts uniqueness in pipeline ([#781](#781)) ([66075ba](66075ba))
@ioredis-robot
Copy link
Collaborator

🎉 This PR is included in version 4.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

janus-dev87 added a commit to janus-dev87/ioredis-work that referenced this pull request Mar 1, 2024
## [4.5.1](redis/ioredis@v4.5.0...v4.5.1) (2019-01-13)

### Performance Improvements

* add checking and loading scripts uniqueness in pipeline ([#781](redis/ioredis#781)) ([66075ba](redis/ioredis@66075ba))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants