-
Notifications
You must be signed in to change notification settings - Fork 569
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
[perf] websocket optimisation #453
Conversation
parser.encodePacket(packet, self.supportsBinary, parserCb); | ||
} | ||
|
||
function parserCb (data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about renaming that method send
, to better reflect its purpose?
}); | ||
}); | ||
}); | ||
function sendCb (err) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same hère, how about something like onEnd
?
Hi, thanks for that PR! I made some minor comments, could you please check them? Did you see any other area of improvement? |
Will check tonight and change what you suggested |
That should be in your global .gitignore, shouldn't it?
Thanks! |
Safely resolve `ws` module.
The kind of change this PR does introduce
Current behaviour
use forEach loop and anonymous functions
New behaviour
use for loop and cached function
Other information (e.g. related issues)
Why it's better to use cached functions: see this