CC: | tadzikes [...] gmail.com |
Subject: | First response of bots based on Bot::BasicBot is very slow |
When a non-trivial bot based on Bot::BasicBot returns a string from method "said", there is a very noticable delay (between 5s and 10s I'd guess) between returning the string, and the bot printing the response in the channel.
This delay only happens the first time a non-empty string is returned; it's gone on subsequent executions.
Sadly, I can't reproduce the problem with a very simplistic bot; one project that exhibits it is https://github.com/perl6/evalbot/ and can be easily observed by inserting a warn() statement before the return() here: https://github.com/perl6/evalbot/blob/98c9ae5d47f67f87beef212b2f7b1a51177ebd76/evalbot.pl#L270
Observing both the console that the bot runs on an the IRC channel makes the delay obvious.
I thought this was a quirk introduced by the weird things that evalbot does, but it seems I'm not alone: http://irclog.perlgeek.de/perl6/2014-09-25#i_9409316