Comments (8)
It depends on the specifications for running this package, because this package uses puppeteer as its main model, of course it's like running a browser on your computer.
from whatsapp-web.js.
@azickri I have few whatsapps running, only 1 of the customer has this issue, others are fine, it depends on how heavy load of the WhatsApp, not about browser only
from whatsapp-web.js.
@momokang Really? What specifications do you use to run this package?
from whatsapp-web.js.
@azickri 4v CPU with 8GB RAM, each time the customer trying to do like getChats, it needed to wait 30 seconds, for getMessages, maybe 10+ seconds, if I'm using my WhatsApp, it took within 1 second to get the data.
from whatsapp-web.js.
@momokang With these specifications, how many numbers are connected?
I think as for the slowness of retrieving messages, have you tried limiting it per request? You know, like pagination
from whatsapp-web.js.
@azickri Hello, sorry for not saying all the information, the server is connected with 4 numbers.
Yes, I do limit in getMessages
chat.fetchMessages({ limit: 20, })
but there is not pagination inside getChats so I just do my own getChats pagination
waClient.getChats()
.then(async function (chatsWithMessages) {
let output = [];
for (let key = 0; key < 50; key++) {
// return output
The CPU and Memory is not much, average is like 50%
from whatsapp-web.js.
Maybe the method for getting the message needs to be changed.
Previously I also directly fetched a message to the client and several users experienced this (it took a long time to get the message).
I changed the method to: every incoming message is saved to the Database, and for old messages there is a feature to Sync Messages in the Application, so users won't wait long to get messages.
This will also have a huge impact on the workflow of the applications we create and the extra work to change them.
Sorry if it doesn't help.
from whatsapp-web.js.
@azickri Yes, that is what I am planning to work on it on my next tasks, initially I told my customer I will not save their messages in my database (privacy concern), but now performance issue is impact on their daily works now... If the library can fetch messages and chats in fast speed, I'm planning not to work on this.. looks like this library can't help :(
Anyway, thanks for your reply and idea given, appreciated.
from whatsapp-web.js.
Related Issues (20)
- QR Code is not working in Ubuntu Platform HOT 22
- After scanning the QR code it will return the new QR code HOT 9
- Not able to generate QR more than two times HOT 2
- Whatsapp does not initialize after QR Code HOT 3
- Error [TypeError]: Cannot read properties of undefined (reading 'default') HOT 1
- After using webcashe HOT 1
- Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'default') | at __puppeteer_evaluation_script__:5:95 HOT 4
- Client not connect HOT 9
- Getting error after loading from session or scanning QR HOT 1
- redirect after client.on('authenticated') HOT 2
- No longer working, what is happenning my friends? HOT 1
- const version = indexHtml.match(/manifest-([\d\\.]+)\.json/)[1]; HOT 2
- The example code is not reproducible HOT 2
- Sending message not working with new contacts HOT 1
- window.store.queryexist Exodus
- Delete message with webpack-exodus
- Not able to scan QR code HOT 2
- Join automatic group with id HOT 1
- Both Client.isRegisteredUser and Client.getNumberId methods are throwing "Invalid WID" error HOT 2
- Chromium still open when im cancel to scan qr and destroy client
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whatsapp-web.js.