Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use of zero-copy / track #1

Open
minrk opened this issue Sep 24, 2013 · 1 comment · May be fixed by #3
Open

use of zero-copy / track #1

minrk opened this issue Sep 24, 2013 · 1 comment · May be fixed by #3

Comments

@minrk
Copy link

minrk commented Sep 24, 2013

I see that you unconditionally use zero-copy and message tracking when you send messages, and only use the tracker as a sort of 'blocking' flag. I wouldn't really recommend taking this approach for a couple of reasons:

  1. zero-copy is actually slower than copying unless messages are large, thanks to the thread coordination involved in dealloc of zero copy messages.
  2. you rarely actually need to wait for zeromq to be done with a message (this misses some of the point of zmq). The main reason to track messages is to avoid memory corruption of arrays that you plan to change.
@philipbergen
Copy link
Owner

Good points, thanks! I'll see what I can change. Pull requests are always welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants