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

dispatch 方法占用大量内存 #115

Open
kainhuck opened this issue Apr 24, 2021 · 2 comments
Open

dispatch 方法占用大量内存 #115

kainhuck opened this issue Apr 24, 2021 · 2 comments

Comments

@kainhuck
Copy link

我最近在一个项目中将hmq作为mqtt服务器,不得不说这是一个十分好用,性能也足够强悍的golang mqttbroker
但是通过pprof分析后我发现pool下面的dispatch方法占用了大量的内存。我是在校大学生水平有限,猜测可能是make chan时分配的空间太多,我改成无缓冲的channel后内存显著下降,我提交了 pull requests,望多多指教

@kainhuck
Copy link
Author

附上图片一张
image-20210424141810899

@turtletramp
Copy link
Contributor

turtletramp commented May 12, 2021

The pull request: #114

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

No branches or pull requests

2 participants