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

the cost of respToken in respHandler is much higher than expected #1560

Closed
chgz opened this issue Feb 18, 2024 · 2 comments · Fixed by #1575
Closed

the cost of respToken in respHandler is much higher than expected #1560

chgz opened this issue Feb 18, 2024 · 2 comments · Fixed by #1575
Labels
defect Suspected defect such as a bug or regression

Comments

@chgz
Copy link

chgz commented Feb 18, 2024

Observed behavior

In a simple subscription service, about 70k/s qps.
Observed through pprof, the cost of respToken in respHandler is much higher than expected.
I'm not using any wildcard topics, it's all fixed topics.
resptoken

Expected behavior

less overhead here

Server and client version

github.com/nats-io/nats-server/v2 v2.8.4
github.com/nats-io/nats.go v1.27.1

This part of the code is the same as the latest version.

Host environment

Linux x64
Centos 7.3

Steps to reproduce

@chgz chgz added the defect Suspected defect such as a bug or regression label Feb 18, 2024
@piotrpio
Copy link
Collaborator

piotrpio commented Feb 19, 2024

Hello @chgz, thanks for creating the issue. I'll see if there's a good way to optimize it, we have to verify the subject in respToken though.

@chgz
Copy link
Author

chgz commented Feb 26, 2024

Thanks for your reply.
Looking forward to good news.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants