We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
使用目前nacos-sdk-go的最新代码,写一个仅与nacos建立连接并监听配置变化但其他啥也不做的小程序,该程序空跑占用2%的cpu。发现NewConfigClient调用delayScheduler时第二个参数写死为10毫秒,这样每秒就要循环100次。将第二个参数改为1s,cpu占用为0 。改为100ms,会有周期性波动,最多是1%,但多数情况都是0。
看之前曾merge过一个pr:https://github.com/nacos-group/nacos-sdk-go/pull/112/commits/58e8ae45d824cf69a0b5f057043f26228b2c57fe,该pr支持设置delayScheduler的delay参数。现在这个pr似乎又被改回去了。
因此,我的问题是:
The text was updated successfully, but these errors were encountered:
10ms 计算一次是否有新的监听任务, delay 越大 监听配置的时机越晚。 后续调整到500ms吧,目前看10ms 也没什么必要
Sorry, something went wrong.
No branches or pull requests
使用目前nacos-sdk-go的最新代码,写一个仅与nacos建立连接并监听配置变化但其他啥也不做的小程序,该程序空跑占用2%的cpu。发现NewConfigClient调用delayScheduler时第二个参数写死为10毫秒,这样每秒就要循环100次。将第二个参数改为1s,cpu占用为0 。改为100ms,会有周期性波动,最多是1%,但多数情况都是0。
看之前曾merge过一个pr:https://github.com/nacos-group/nacos-sdk-go/pull/112/commits/58e8ae45d824cf69a0b5f057043f26228b2c57fe,该pr支持设置delayScheduler的delay参数。现在这个pr似乎又被改回去了。
因此,我的问题是:
The text was updated successfully, but these errors were encountered: