Yes, if you send your msgpacked bytes with copy=False
, there will be no extra copies of the data in-memory for the sending process (same goes for receiving side with copy=False
).
Make sure to do performance tests, as the cost of the more complicated zero-copy machinery is often greater than the cost of the copy itself until messages start to get fairly large (crossover around 10s of kB per message).
An alternate approach is that you could just use the builtin multiprocessing module's facilities for shared data. It's not the most awesome, but for fairly simple things it can get the job done.