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

Split the xxxIdList to chunks when map it to payload to prevent block the event loop #1450

Closed
huan opened this issue Jul 7, 2018 · 1 comment
Labels

Comments

@huan
Copy link
Member

huan commented Jul 7, 2018

Wechaty v0.17.116

const contactList = await contact.findAll()

The above code will block the event loop for over 100 seconds when we have too many contacts.

For example, I have over 150,000 contacts and it will have to use 8GB memory and wait more than ten minutes before it crashed.

@huan
Copy link
Member Author

huan commented Jul 12, 2018

It seems the thing gets to be better after the last commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant