-
Notifications
You must be signed in to change notification settings - Fork 186
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
Publish call high latency #494
Comments
That's unfortunate. Are you using the topic publish method or the pubsub level Publish method? Can you profile this? |
First of all, thank you for your fast response! I have profiled it and the most time takes it at signing messages. If I disable signing it reduces from 5ms to 0.3ms. So I guess it's not bad. However, I do want to sign the messages. Moreover, there is no really a regression from 0.6 to 0.7. However, I would like to know, what is the lock needed for? |
Are you using RSA keys for some reason? Can you try with ed25529 keys? |
The lock is used to prevent data races, maybe we can get rid of it indeed. |
I checked and we do use RSA, because when you create a new On the other hand, what is the data race that we prevent using the lock? I checked and I could not find any, apart from the |
Or a CAS with sync/atomic; care for a patch? |
Okay, patch done. I used the uber package since internally makes use of |
Hello,
The
Publish
call, in my application, is taking in average5ms
to complete. Moreover, it makes use of an internal lock. Therefore, if you executePublish
N times in parallel, it takes5ms+N
to complete all of them.Taking this into account, I have a question: What is the lock used for, apart for accessing the
t.closed
bool? Is there a way to get rid of it? Right now the Publish call it is a huge bottleneck.The text was updated successfully, but these errors were encountered: