Skip to content

Socket events getting too much time to fire #3179

@harirehm

Description

@harirehm

I am using socket.io for my chat app. (HTML + JS & node js). It's working fine and great when one client connects to it.

But when another window is opened to start the chat, the chat becomes very slow. When three or four users connect to the chat at the same time, it's getting even slower such that, it looks like, it's almost freezed.

FYI, throughout the application, I have used socket.emit() (with & without callbacks). My requirement is, receive a message from the client, respond to the client. It's no group chat or anything. The user will chat with a bot (server). Said that, the message sent by the user (to the server) will not be sent to any other users. So, I fond that socket.emit() is the right way to deal with in this case.

Am I getting it wrong? Should I use some other way for emitting?

Note:-
The application works perfectly when running inside the enide studio with the inbuilt node js server. But, when deployed, the events are extremely slow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions