totallymike / ircnode

Extensible IRC bot written with node.js
https://github.com/totallymike/ircnode/wiki
MIT License
4 stars 2 forks source link

Speed issues #41

Closed sigv closed 9 years ago

sigv commented 12 years ago

The bot's response times are not so great. This can be most noticeable when you spam the bot with a command that has echo functionality or just launch two bots sending the same message to each other in the same room (for example, ping-ponging the whole time).

After quick investigation, I believe that this has to do something with the node's socket itself, but I'm not fully sure.

// A simple lag testing plugin for IRC Node.

var irc = global.irc;
var intervalID = -1;

var lagtest = function () {
  irc.privmsg('#testing', 'Test.');
};

var cmd_handler = function (act) {
  if (intervalID !== -1) {
    clearInterval(intervalID);
    intervalID = -1;
  } else
    intervalID = setInterval(lagtest, 250);
};

exports.name = 'lagtest';
exports.handler = cmd_handler;
sigv commented 12 years ago

After some more extensive testing, I'm not so sure about it being a problem with the language itself, but more with the server, as the messages the bot receives are being queued and everybody receives them with a delay on their systems.

sigv commented 9 years ago

Closing due to old age as WONTFIX.