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

roomMemberSearch 方法可以进行优化,否则可能会影响群消息的监听时间 #203

Open
leochen-g opened this issue Jul 16, 2022 · 1 comment

Comments

@leochen-g
Copy link
Contributor

leochen-g commented Jul 16, 2022

1、从puppet-wechat发现群消息监听的时候会进行群成员的查询,而此方法比较耗时,可能达到6s左右。测试使用await Promise.all后时间缩短到2s,单应该还不是最好的状态

image

image

image

2、可以看到为了查询一个群成员会调用三次方法,而且每次调用方法都会把所有群成员的消息全部请求一遍,这就导致查询速度会降低很多,而且对同一个群也会查询三次,复用率很低,感觉可以优化一下,先查询群成员信息,再进行后续的步骤

image

image

@leochen-g
Copy link
Contributor Author

#wechaty/puppet-wechat#207

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

1 participant