Is there any suggestion for optimize socket response time

Hi there, I’m using socketIO for chatbot integertion.
When I send a new message, it cost about 3~5 seconds to response.
Is there any way to lower the response time?

My current model has 350+ intents, and using MemoizationPolicy、TEDPolicy and RulePolicy. (Mongodb for tracker store.

I read this thread, but it still needs 3~5 seconds to response after I clear the tracker.

OS: Win 10 Rasa version: 2.8 Python version: 3.7 Rasa X, Rasa SDK: Not using

Thanks in advance

@RUI-LONG what is your front-end?

@nik202 I’m using rasa-webchat v1.0.1 for front-end

@RUI-LONG means you are looking for a fast response time for the bot is that right?

@nik202 Yes, I’m looking for faster response time
Is there any suggestions? Thanks for response

@RUI-LONG mention this in the bot front snippet code and see the difference

customMessageDelay: (message) => {
          let delay = message.length * 30;
          if (delay > 3 * 200) delay = 3 * 200;
          if (delay < 100) delay = 100;
          return delay;

Good Luck!!

1 Like

@nik202 Thanks!!! It really helps a lot.