We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There are code parts like this https://github.com/luin/ioredis/blob/master/lib/commander.js#L43-L53
var args = _.toArray(arguments); var callback; if (typeof args[args.length - 1] === 'function') { callback = args.pop(); } var options = { replyEncoding: 'utf8' }; if (this.options.showFriendlyErrorStack) { options.errorStack = new Error().stack; }
Part about the arguments: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
I understand that there is lots of boilerplate code, but it is supposed to speed up the module quite a bit
smth: function() { var length = arguments.length; var lastArgIndex = length - 1; var callback = arguments[lastArgIndex]; if (typeof callback !== 'function') { callback = undefined; } else { length = lastArgIndex; } var args = new Array(length); for (var i = 0; i < length; i++) { args[i] = arguments[i]; } // .... options part var command = new Command(commandName, args, options, callback); return this.sendCommand(command); }
The text was updated successfully, but these errors were encountered:
20df742
Released in 1.3.1. These changes improves the performance a lot. Thank you for pointing this out :-).
Sorry, something went wrong.
No branches or pull requests
There are code parts like this https://github.com/luin/ioredis/blob/master/lib/commander.js#L43-L53
Part about the arguments: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
I understand that there is lots of boilerplate code, but it is supposed to speed up the module quite a bit
The text was updated successfully, but these errors were encountered: