ipykernel
ipykernel copied to clipboard
use of zmq zero-copy is no longer correct
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.