Closed griffinmilsap closed 1 year ago
In running test_perf against main
, I am noticing a decrease in max effective send rate ~7ksamps/s vs ~9ksamps/s. Overall bandwidth appears to be slightly decreased as well. Running on x86_64-darwin, python 3.11.
@pperanich That's on me... I had to change the message size of the perf test to debug something and never changed it back. I've pushed a change that allows an apples-to-apples comparison.
It also turns out that calculating backpressure with every message was resulting in a pretty severe performance regression. That's been addressed and I'm now seeing identical performance for small message sizes between the main
branch and this one.
This pull request implements message caching local to each process. Messages are assigned unique message IDs and assigned to the local message cache. Subscribers always check the cache for the message before trying to reconstitute a version of the message from shared memory.
This enhancement makes it such that no (de)serialization or message copies are required for pubs/subs that exist together in the same process.