Return early when channels mismatch to skip expensive msgpack decoding#107
Merged
rauchg merged 3 commits intosocketio:masterfrom May 9, 2016
Merged
Return early when channels mismatch to skip expensive msgpack decoding#107rauchg merged 3 commits intosocketio:masterfrom
rauchg merged 3 commits intosocketio:masterfrom
Conversation
Member
|
LGTM 👍 Could you squash it into one commit please? |
658b0d4 to
5bcb29d
Compare
Contributor
Author
|
@darrachequesne squashed! Thanks for quick reply! (hopefully, version bump is preferred... :p) |
Contributor
Author
| } else { // Fallback to slow indexOf impl for older Node.js | ||
| this.channelMatches = function (messageChannel, subscribedChannel) { | ||
| return messageChannel.indexOf(subscribedChannel) === 0; | ||
| } |
Contributor
There was a problem hiding this comment.
How about just using substr ?
Contributor
Author
Contributor
Author
There was a problem hiding this comment.
@rauchg I referred to https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
I leant something from your suggestion, thank you!
Contributor
|
Thanks! |
Contributor
Author
|
@rauchg Thanks a lot! Also, could you tell me when a new version will be released? :) |
Contributor
Author
|
@darrachequesne @nkzawa @rauchg sorry for indiscriminate pinging... Some time has passed. Hopefully, I rather want this modification to be officially released. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hopefully, the title says all.
Well, we're using a lot of namespaces. and there is performance problem.