the switch from ZMQStream to async Socket in #1079 has resulted in always receiving all messages with copy=True, but there are checks for isinstance(always_bytes_object, zmq.Message) which always results in copy=True.
This can get costly because inproc sends with copy=False are particularly lightweight, whereas the new unconditional copy plus additional inproc send/recv for subshells result in at least two additional in-memory copies of every message frame received by the kernel.
the switch from ZMQStream to async Socket in #1079 has resulted in always receiving all messages with
copy=True, but there are checks forisinstance(always_bytes_object, zmq.Message)which always results incopy=True.This can get costly because inproc sends with
copy=Falseare particularly lightweight, whereas the new unconditional copy plus additional inproc send/recv for subshells result in at least two additional in-memory copies of every message frame received by the kernel.