juzibot / wxwork-tester-deprecated

34 stars 6 forks source link

当机器人加超过3000个群之后room.find()函数响应非常慢,超过2分钟,该如何解决? #54

Open CashunterXie opened 2 years ago

CashunterXie commented 2 years ago

Important:Please file the issue follow the template, or we won't help you to solve the problem. 当机器人加超过3000个群之后room.find()函数响应非常慢,超过2分钟

0. Report Issue Guide

  1. Please run the following command and check whether the problem has been fixed:

    rm -rf package-lock.json
    rm -rf node_modules
    npm install
  2. Please search in FAQ List first, and make sure your problem has not been solved before.

  3. Please search in the issue first, and make sure your problem had not been reported before

1. Describe the bug

Give a clear and concise description of what the bug is.

2. To Reproduce

This part is very important: if you can not provide any reproduce steps, then the problem will be very hard to be recognized.

Steps to reproduce the behavior:

  1. run '...'
  2. ...
  3. ...

3. Full Output Logs

Set env WECHATY_LOG=silly in order to set log level to silly, then we can get the full log (If you dosen't set log env, log level is info as default, we cannot get the full log)

We need full log instead of log screenshot or log fragments!

Show Logs ```shell $ WECHATY_LOG=silly node yourbot.js Question: Paste your FULL(DO NOT ONLY PROVIDE FRAGMENTS) log messages Answer: ```

4. Additional context

Add any other context about the problem here.

[bug]

su-chang commented 2 years ago

推荐将群控制在 300 以内,太多群聊的情况下会损失一部分性能。

或者将 room.find() 查找后的结果存储在本地数据库中,后续查询先查询本地数据库即可。每天和数据库中的信息同步一次即可。