-
Notifications
You must be signed in to change notification settings - Fork 106
Closed
Milestone
Description
encode uses has-binary2 to check if the given data is binary or not:
Line 127 in f9c3549
| if ((obj.type === exports.EVENT || obj.type === exports.ACK) && hasBin(obj.data)) { |
has-binary2 has a bunch of early exits if it does find binary data, but in the case where the input is not binary, it ends up recursively walking the entire object.
It would be nice if I could pass a flag through from socket.io to say "I already know this isn't binary, so don't even bother checking" to avoid this additional expense.
Xaekai
Metadata
Metadata
Assignees
Labels
No labels